Versions Compared

Key

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

...

  • Job options include the following configuration items:



  • Parallelism: Should more than one order pass the workflow at any given  time or should parallel child orders execute the same job, then this setting determines the maximum number of tasks that are available for the job. This limits parallelism of tasks to the specified number. If more than the specified number of tasks is requested then orders have to wait until a task becomes free.
  • Timeout / Grace Timeout: Specifies the maximum duration that a job should run.
    • If the timeout is exceeded then the Agent will send a SIGTERM signal to a shell job. This corresponds to executing the kill -15 command in Unix environments. The purpose of the SIGTERM signal is to let the job know that it should terminate and to leave it up to the job implementation to perform some cleanup tasks such as disconnecting from a database or removing temporary files.
    • After sending the SIGTERM signal the Agent will wait for the duration of the Grace Timeout to allow the task to complete. If the Grace Timeout is exceeded then the Agent will send a SIGKILL signal that will kill the task. This corresponds to executing the kill -9 command in Unix environments.
  • Warn on shorter execution: Specifies that a warning is created if job execution time falls below this limit. Jobs with warnings are considered successful and are not subject to error handling.
    • The setting can specify an absolute value in seconds, for example 3s.
      • Alternatively to specifying seconds the duration can be specified using the format hh:mm:ss, for example 01:30:00 for one and a half hours.
      • Alternatively to specifying absolute values a percentage can be specified that is calculated from successful past job executions. A value 30% indicates that a warning is raised if the execution time falls below the average by this ratio.
    • The job will raise a notification when falling below this limit.
  • Warn on longer execution: Specifies that a warning is created if job execution exceeds this limit. Jobs with warnings are considered successful and are not subject to error handling.
    • The setting can specify an absolute value in seconds, for example 3s.
      • Alternatively to specifying seconds the duration can be specified using the format hh:mm:ss, for example 01:30:00 for one and a half hours.
      • Alternatively to specifying absolute values a percentage can be specified that is calculated from successful past job executions. A value 30% indicates that a warning is raised if the execution time exceeds the average by this ratio.
    • The job will raise a notification when exceeding this limit.
  • Compatibility: For users of JobScheduler branch 1.x a compatibility mode is available.
    • For use of environment variables compatibility enables:
      • the automatic creation of environment variables for shell jobs from any available order variables and job arguments.
      • the use of the SCHEDULER_PARAM_ prefix for any environment variable created.
    • For use of job arguments the compatibility mode offers a corresponding tab.
  • Criticality: This option allows a level to be selected that can be used for monitoring purposes to prioritize alerts depending on a job's criticality.
  • Credential Key / Load User Profile: Specifies for jobs executed with Agents for Windows that the job should switch user context, see JS7 - Running Jobs as a different User.
  • Fail on output to stderr / Warn on output to stderr: Checks for output in the stderr channel and raises an error or a warning.
    • Fail: If output in the stderr channel is identified then an error is raised and the job is subject to error handling.
    • Warn: If output in the stderr channel is identified then a warning is created.
    • In both situations a JS7 - Notification is created.
  • Skip job if no admission time / Show periods: Specifies that the job should be skipped if the order's daily plan date does not match the days specified with the JS7 - Admission Times for Jobs.
    • If the checkbox is no checked then the job will wait for the next admission time.
    • The  Show Periods link allows to manage the job's admission times.
  • Job options for JVM jobs do not offer all above options:

...

  • determines if a job's return code signals success or error. From a number of successful return codes some can be selected to signal warnings that create a JS7 - Notification.
  • can be configured to check if a job has written any output to the stderr channel and to fail the job if such output exists or to raise warnings.

Error handling for jobs is performed by workflow instructions:

...

Find details from the JS7 - How To - Error Handling section.

How to

...

use the same job in a workflow

...

a number of times

A job can occur a number of times The references to the same job in a workflow means using that job in a workflow multiple timesby using references to the same job. For example, if a job needs to be should executed twice in a workflow twice, then it can be referenced twice in that the workflow. Such an operation can be handled by creating This includes to create different Labels on for the job as the labels assign labels assign a name to the workflow node that is assigned the job. A job can then be reused using multiple label names and where each label name is unique across the same job name and different labels with each occurrence of the label being unique within the workflow.

For example, a workflow contains 1 a job named with the name job1. Then use the name of the job as job1 only for any occurrence of the job and assign different labels to different a number of nodes. As in the example, the names of the node labels used are job1 and job1-copy. Now any changes applied to job job1 will be applied to both the nodes in the workflow as both the labels point to the same job name.



Further Resources