You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Question:

If I have a stand-alone job set to run every 30 minutes, what will happen if that job is still running after 30 minutes? What I need to happen is that the job will just continue to run and will not start again until it is complete.

Answer:

The simplest approach here is to set either the http://www.sos-berlin.com/doc/en/scheduler.doc/xml/period.xml#attribute_repeat repeat or http://www.sos-berlin.com/doc/en/scheduler.doc/xml/period.xml#attribute_absolute_repeat absolute_repeat attributes for the JobScheduler http://www.sos-berlin.com/doc/en/scheduler.doc/xml/period.xml period element.

In JOE, this is done by selecting the stand-alone Job in the Scheduler Elements window and then opening the "Run Time" "Every Day" form. Then select "New Period" in the Periods window to activate the "Start Time" fields. Then select either "Interval end/start" or "Interval start/start" with the drop-down button.

  • "Interval end/start" corresponds with the XML setting:
 <run_time>
        <period absolute_repeat="00:30:00" begin="00:00" end="24:00" />
 </run_time>
  • "Interval start/start" corresponds with the setting:
 <run_time>
        <period repeat="00:30:00" begin="00:00" end="24:00" />
 </run_time>

The http://www.sos-berlin.com/doc/en/scheduler.doc/xml/period.xml#attribute_repeat repeat attribute will cause the job to be started every, in this case, 30 minutes.

The http://www.sos-berlin.com/doc/en/scheduler.doc/xml/period.xml#attribute_absolute_repeat absolute_repeat attribute will cause the job to be restarted, in this case, 30 minutes after it has last ended.

JobScheduler is programmed so that if a job which is set to rerun every 30 minutes using the repeat attribute should take longer than this to complete then it will wait until the job has completed before restarting it. This is also true when the job is allowed to start in a number of tasks. E.g.:

 <job enabled="yes" tasks="10" name="job1">
  • No labels