Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor corrections to text

Table of Contents

Trigger Error Conditions

Question:

Can a job call database procedures or a successor job for error handlingas a method of handling errors?

Answer:

Within Error states within job chains an error state is are assigned to a job and it is up to you to implement a job for error handling. Without specific job for error handling The JobScheduler can be configured to send mails with an attached log file in case the event of errors when a specific error handling job is not used.

The use of successor jobs in case of errors can be configured withusing the on_exit_code attribute:

Code Block
    <job stop_on_error="no">
    ...
      <commands on_exit_code="error">
        <start_job job="my_error_handler"><params/></start_job>
      </commands>
    </job>

...

This configuration lets the job start a successor in case of an error that is signaled by an exit code that is not 0. Additionally In addition, this example causes the job to continue in case of errors (<job stop_on_error=...>), i.e. the normal behavior for jobs that are not in job chains - to stop a the job in case of errors - does not apply. Individual exit codes and ranges of exit codes can be specified for the on_exit_code attribute.

...