Monitors (also called Pre-/Post-Processing Monitors) are used with Jobs to provide pre-processing and post-processing capabilities by Scripting. Pre-Processing Monitors are executed before a task or processing step is executed by the JobScheduler. Similarly Post-Processing Monitors are executed once a task or processing step has been completed. 

  • Jobs can have multiple Pre-/Post-Processing Monitors. The order in which these are executed by the JobScheduler can be specified by setting a parameter.
    • Pre-Processing Monitors can be created to 
      • validate required conditions for a particular task to be started or 
      • set a parameter value dynamically, e.g. today's date.
    • At the same time Post-Processing Monitors can check the job's execution status, return code, total execution time etc..
  • Pre-/Post-Processing Monitors can be programmed independently of a job's programming language. For example, a shell script job can have a Pre-/Post-Processing Monitor written in JavaScript. 

Scripted Pre-/Post-Processing Monitors

  • Monitor scripts can include
    • Java classes
    • JavaScript code
  • Scripting is a powerful means for flexibility:
    • JavaScript code can be added directly to Jobs and Monitors and is interpreted at run-time. A build cycle is not required.
    • Java classes can be added that make use of of the available Java library ecosystem.
  • The JobScheduler exposes its objects, methods and properties by way of its API Interface.

Methods of Specifying Monitors

Monitors can be specified in the following ways:

  • As Named Monitors:
    • Named Monitors are specified in the configuration of individual jobs.
  • As Enforced Monitors:
    • Enforced Monitors are specified in the JobScheduler configuration and are therefore by default applicable to all jobs executed by the JobScheduler.
      • Filters can be used to limit the monitors and the jobs that they are applied to.

A Monitor can be specified as both a Named Monitor and as an Enforced Monitor.

See also