3 Replies Latest reply on Feb 23, 2011 7:17 AM by abucs01

    Seam Quartz

    abucs01

      Hi ,


      Seam Quartz can be made active and deactive on the fly without restarting apps server?


      example: according to DB value 1 or 0 quartz should be start and stop with restarting application server ?



      is this possible?

        • 1. Re: Seam Quartz
          ssachtleben.ssachtleben.gmail.com

          You can save the state of the cronjob in database. On cronjob start u just check if it should run or not


          public void execute(...) {
          
            CronjobState state = em.find(CronjobState.class, 1);
            if (!state.isRunning() {
              return;
            }
          
            // Cronjob part here
          
          }



          Not sure about stopping the whole quartz process.

          • 2. Re: Seam Quartz
            kapitanpetko

            aboo salimon wrote on Feb 10, 2011 00:40:


            Hi ,

            Seam Quartz can be made active and deactive on the fly without restarting apps server?

            example: according to DB value 1 or 0 quartz should be start and stop with restarting application server ?


            is this possible?


            Yes. Get a hold of the Scheduler class and use the normal Quartz APIs to start/pause, etc.


            HTH

            • 3. Re: Seam Quartz
              abucs01

              yes it is working .... thnx nikolay