Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 'Basic Error Handling' added

...

Excerpt

There are several ways to handle errors:

Basic Error Handling

A Job ends in error when the script or program it calls returns an exit code other than 0. The Job will then be stopped, unless Stop On Error has been deactivated (see the Setting up a Standalone Job screenshot of JOE in the first half of this article). Jobs that have been stopped are marked in red in the log in JOC - JobScheduler Operations Center.

Behavior of Stopped Standalone Jobs

Stopped Standalone Jobs can be manually restarted in JOC using the Job menu->Start job immediately function. However they cannot be restarted automatically, either with a scheduled start or by directory monitoring. Use the function Job menu->Unstop in JOC to manually unstop a job.

Error Handling for Standalone Jobs

A Standalone Job can be configured to rerun after the Job has ended in error.

Configuring the Scheduled Repetition of a Standalone Job Ending in Error

Select the Run Options function, which is a Job sub-element in the JOE element tree. In the Delay After Error area you can use the New Delay button to specify a scheduled (delayed) restart of the Job. Enter, for example, values for Error Count and Delay of 2 and 00:00:10. Use the Apply Delay button to save these settings. Now repeat this procedure but enter an Error Count of 5 and check the stop radio button.

Image Added

 

When the Job first ends in error, it will be immediately restarted. However, if the Job continues to end in error, after the 2nd rerun, the restart will only take place after a delay of 10 seconds and after the 5th attempt the Job will be stopped.

Now start the Job in JOC, and look in the Task History, where the repeated job starts can be seen along with the delays they were subjected to.

Image Added

Other methods of handling errors for Standalone and for Order Jobs can be found in the articles linked below.

Further Resources

...

Error Handling

...