Scope
- JobScheduler implements the concept of a "critical path", i.e. the fact that in case of time constraints some less critical jobs should be skipped during daily or nightly processing.
- This article introduces the solution for JobScheduler.
Download & Installation
-
FEATURE AVAILABILITY STARTING FROM RELEASE 1.9
- Starting with this release this feature is included with the JobScheduler setup.
- For previous releases please use the below downloads.
- Download the unpack the archive:
- Installation
- Java JAR files
user_lib/com.sos-berlin.jitl.criticalpath-0.1.jar
- copy this file to the
<scheduler_home>/lib/user_lib
folder. If this folder not exists, copy the file to the<scheduler_home>/lib
folder directly.
- copy this file to the
- Job Documentation
jobs/JobSchedulerCriticalPathUncriticalJobNodes.xml
- copy this file to
<scheduler_install>/jobs
- copy this file to
- Job Object Folder
config/live/sos/operations/criticalpath
- copy this folder to
<scheduler_install>/config/live/sos/operations/criticalpath
- copy this folder to
Explanations
Job Chain sos/operations/criticalpath/UncriticalJobNodes
The functionality includes job nodes to be skipped for critical path processing. This is achieved by
- marking a job node being part of a critical path by prefixing the job node state attribute either with "+" (required) or "-" (skippable).
- running the
Skip
order that depending on its parameterization would run in one of these processing modes:- skip the job nodes that are marked as being skippable ("-") (default) or
- skip the job nodes that are not marked as being required ("+").
- running the
Unskip
order that will reverse the above operation.
The different processing modes are supported by the following configuration:
- Job node states in job chains can be marked to be skipped for critical path processing by prefixing them with a "-" character.
- Job node states in job chains can be marked to be required for critical path processing by prefixing them with a "+" character.
Usage
A business process usually consists of one or more individual jobs that make up a job chain. In some cases not all jobs are important to the same extent. Should you face a situation when there is not enough time to process all the jobs of a job chain, e.g. after a maintenance window that reduces nightly processing by some hours, then the critical path defines the sequence of jobs are required to be executed and exlcudes jobs of minor importance to save processing time.
Planned Critical Path Activation
Scenario
Quite often business processes do not provide of a fixed start time, average run time and expected end time, but in case of circumstances the fixed start time has to be changed, e.g. due to system maintenance, delayed availability of input data etc.
- In such an exceptional situation to achieve the business process goals with adherence to the SLA, some jobs can be excluded from the business process (job chains).
- A job can be marked in a job chain either being skippable ("-") or being critical ("+" ) for the business process.
- If a situation arises where parts of the job chain have to be skipped, then the JobScheduler operator can start the
Skip
order.
This order will search through the JobScheduler configuration and set the non-critical jobs to skip processing of orders. - A job chain with non-critical jobs is set to skip processing of orders by these jobs independently from the start event of these orders (manually/scheduled).
- Once the business process completes with only critical jobs, then the job chain's original state can be reactivated by the
Unskip
order.
Example Job Chain
Dynamic Critical Path Activation
Scenario
Some business process are dependent on other business process's outcome or an incoming file. A job chain can be configured to monitor a directory and would start as soon as a file matching with the regular expression found in the directory. So for example usually the file arrives every day before 05:00am and the job chain completes successfully at 09:30am, but due to unexpected circumstances if the file arrives later than usual it may be desirable that the job chain should complete at its usual time.
- In such an exceptional situation the job chain can have the first node check the current time and if it finds late arrival of the file then triggers the
Skip
order - Once processing completes successfully the last node of the job chain can start the
Unskip
which will reset the job chain status back to normal operation with all the jobs to be executed.
Example Job Chain