Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

XML Configuration of the Job

Code Block
languagexml
<?xml version="1.0" encoding="ISO-8859-1"?>
<job order="yes"
     stop_on_error="no">
    <script language="shell"><>
        <![CDATA[
exit 1
      exit 0 ]]>
   ]]>< </script>
    <monitor name="handleSetback"
             ordering="0">
        <script language="javax.scriptjava:ecmascript"><javascript">
            <![CDATA[
function spooler_task_after() {
  var exit = spooler_task.exit_code();
  var job = spooler_task.job();


  // After one setback, handle this as an error.
  job.set_max_order_setbacks( = 1 );


  switch ( exit ) {
    case 0:  // proceed
      return true;
    case 1:  // Restartrestart after 60 seconds
      job.set_delay_order_after_setback( 1, "60" );
      break;
    case 4444: // Restartrestart after 2 hours
      job.set_delay_order_after_setback( 1, "02:00:00" );
      break;
    default: // Restartrestart after 300 seconds
      job.set_delay_order_after_setback( 1, "300" );
      break;
  } 
}
            ]]><>
        </script>
    </monitor>
    <run_time/>
</job>

XML configuration of the Job Chain

...