You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Scope

  • By use of Scripting conditions can be added that are checked before a job will be executed.
  • Such conditions can include dynamic date calculation to check if the current date is confirmed for execution of a job.
  • Scripted conditions are considered more dynamic and flexible than configurable conditions.

Scripted Conditions

  • Scripted conditions can be added by use of Pre- and Postprocessing Scripts.
  • Each job can be assigned a number of Pre- and Postprocessing scripts that are executed in the configured sequence.
  • The scripts can include
    • Java classes
    • JavaScript code
  • Scripted Conditions are a powerful means for flexibility:
    • JavaScript code can be added directly to Jobs and Monitors and is interpreted at run-time. No build cycle is required.
    • Java classes can be added that make use of of the ecosystem of available Java libraries.
  • The JobScheduler exposes its objects, methods and properties by use of the API Interface.
  • Scripted Conditions are applied by implementing a spooler_process_before() method that will
    • return the value true if the job should start,
    • return the value false if the job should not start,
    • move Orders to the next state in a job chain if the current job should be skipped.

Date Calculation

  • Date calculation can be performed by use of JavaScript and Java:
    • JavaScript provides built-in date calculation capabilities.
    • Java extends the JavaScript capabilities if used with specific libraries for date calculation.
  • Date calculation is an intrinsic topic when considering time zones, daylight saving time, leap years etc. which is why we estimate scripting to be superior to using GUIs when it comes to more complex conditions.

Examples

Run a job on the first week of each month

  • The requirement translates to: run a job on working days only of the first week of a month. Working days are assumed to be Monday to Friday.

Run a job between the 5th and 15th day of a month

  • tbd

See also

 

  • No labels