Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Download file updated

...

This article show how you can make a job retry in event of errors and control this behavior.

Downloads

Required Version:

You will require JobScheduler Version 1.8 or newer to be able to run the example configuration files.

Download the file:

Instructions

...

  • Start the order by choosing "Start order now" from the Order menu.
    • Watch the log grow in the log window.
    • The order will run into the first job (setback) of the chain. This job simulates actually uses a script to simulate an error and sets the order back into the Order Queue.
      You can see the Order Queue by clicking on the job to show the Job and Task History panes and select the Order Queue tab, which is alongside the Task History Tab.
    • You will now be able to follow the state of the order in the order queue through the three setbacks specified in the setback job.
      In the queue the order will be shown with a Next start of either:
      • Setback, plus the time left for the setback
      • Running since:
    • After the setback of 20 seconds has been completed, the JobScheduler will make the job process the order again. Like the last time the order will be setback.

On the third try, a successful completion of the job is simulated (representing, for example, that the network connection is working again). The order will then continue into the second job of the job chain.

...

A setback interval is configured for a job - for example:

Code Block
  <!-- after the first setback, try again every 20 seconds -->
  <delay_order_after_setback setback_count="1" delay="20"/>

  <!-- after the 100th setback, try again every 60 seconds -->
  <delay_order_after_setback setback_count="100" delay="60"/>

  <!-- after the 1000th setback, give up -->
  <delay_order_after_setback setback_count="1000" is_maximum="yes"/>

...

When the count parameter of the order has reached 3, success is simulated. The job does not setback the order this time and the order is able to run through the following jobs.

Sebacks in JOE

The JobScheduler's Object Editor, JOE provides a SetBack Form for the configuration of job setbacks. This form, together with the configuration listed in the code block above, is shown in the following screen shot: