2 Replies Latest reply on Jun 17, 2003 10:10 AM by javi

    Configuring scheduled jobs in scheduler-service.xml

    javi Newbie

      Hi there,

      I am using JBoss 3.0.7 and I am trying to configure a scheduled job to be executed twice a day, at 9am and 9pm. I would like to know why my scheduled job is executed the first time one hour after I would expect it to. For example, let's say I update the scheduler-service after 9pm, my scheduler will be executed the first time at 10am (and not 9am) and then every 12 hours (i.e. 10pm, 10am, ...) as expected. Am I setting here any parameter that is actually telling JBoss to do that?


      true
      com.myclasses.MyScheduler
      <attributename="SchedulableArguments">

      1/1/03 9:00 am
      43200000
      -1


      Many thanks,

      Javi

        • 1. Re: Configuring scheduled jobs in scheduler-service.xml
          Juha Lindfors Master

          Hmm.. the only thing I can think of is your Java runtime is getting its system time from somewhere that doesn't match the reality (maybe getting confused with daylight savings or some such).

          Time is such a pain.

          • 2. Re: Configuring scheduled jobs in scheduler-service.xml
            javi Newbie

            Hi there,

            Thanks for the reply. Further to your reply, this is the logging info shown in the server.log file when the InitialStartDate property is set to "1/1/03 6:00 pm", the SchedulePeriod is set to "86400000" (i.e. once a day) and the scheduler-service file is deployed at 2:38pm:

            2003-06-17 14:38:26,910 INFO [org.jboss.varia.scheduler.Scheduler] Starting
            2003-06-17 14:38:26,998 DEBUG [org.jboss.varia.scheduler.Scheduler] Start Scheduler on start up time
            2003-06-17 14:38:27,074 DEBUG [org.jboss.varia.scheduler.Scheduler] Old start date: Wed Jan 01 18:00:00 GMT 2003, now: Tue Jun 17 14:38:27 BST 2003, Skip repeats: 167
            2003-06-17 14:38:27,078 DEBUG [org.jboss.varia.scheduler.Scheduler] Schedule initial call to: Tue Jun 17 19:00:00 BST 2003, remaining repetitions: -1
            2003-06-17 14:38:27,134 INFO [org.jboss.varia.scheduler.Scheduler] Started
            2003-06-17 14:38:27,136 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: scheduler-service.xml
            2003-06-17 14:38:27,136 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:....../jboss3.0.7/server/default/deploy/scheduler-service.xml

            As you can see, the initial call is scheduled to "Tue Jun 17 19:00:00" rather than 6pm.

            Hoping this additional information can help someone out there to help me with this.

            Thanks again,
            Javi