3 Replies Latest reply on May 31, 2010 4:34 AM by saurvals

    Facing issue with the date interval trigger when deployed in JBOSS related to DST

    saurvals

      I am trying to create a biweekly job using DateIntervalTrigger. I am using quartz 1.7.3 jar and also I tried with latest 1.8.0 jar.
      When I create a job by place java application it is working fine. And it is also taking care of DST changes. But when I run it in JBOSS the trigger is scheduled 1 hour later in case of DST.
      For e.g. I create a job to run biweekly on wednesday 3rd March at 4:00PM on 17th March it runs at 5:00PM on JBOSS.
      Does anybody know what could be going wrong? If I need to do something else to make it work on JBOSS?
      Thanks,
      Saurabh V. 

        • 1. Re: Facing issue with the date interval trigger when deployed in JBOSS related to DST
          jaikiran

          Does the system/JVM on which JBoss runs, take into account DST?

          • 2. Re: Facing issue with the date interval trigger when deployed in JBOSS related to DST
            saurvals

            Thanks for the reply. Yes it does consider the DST because other functionalities realted to the DST changes are working correctly. For e.g. the weekly scheduled cron trigger is working accurately considering the DST changes.

            Thanks,

            Saurabh V.

            • 3. Re: Facing issue with the date interval trigger when deployed in JBOSS related to DST
              saurvals

              When I debugged the code, I understood that there is some Timezone mismatch. My application server is running on UTC. When I schedule a DateIntervalTrigger using quartz scheduler it pics the timezone setting of the application server and schedule all the job based on that.

              Now as my jobs were scheduled considering the UTC, DST changes were not getting reflected.

              If I change the default timezone setting of the application server using TimeZone.setDefault() everything works perfectly, but

              Problem now is I cannot change the setting of my application server because it would have a global impact. Instead I might need to handle it manually in the executed job and programmatically re-schedule the job considering DST (which won't be straight forward).

              Ideal solution for this situation is to pass the target timezone to scheduler for scheduling jobs.

              I think it is not supported currently in the quartz framework, correct me if I am wrong.

               

              Thanks,

              Saurabh V.