WORK IN PROGRESS
Starting from JobScheduler release 1.9.0, the JobScheduler offers inbuilt capability to handle exit codes from jobs. The new feature make it possible to manage flow of the job chain depending upon return code from a job. Also now its possible to start a order outside of the job chain depending upon the return codes.
This feature support is subject to the following issues:
Control the workflow the job chain by exit codes
For earlier versions it was not explicitly possible to configure next state of depending upon exit code of job node. Now order can be set to pass to different states depending upon return code e.g. if return code is 0 then order should go to next state but if return code is between 1-5 then order should go to state
Start an order depending upon the result of a job chain node
Now a job chain can be configured to send an Order to the other job chain.
For example There is a dependency between two job chains e.g. JobChain0 and JobChain1 . The JobChain0 has 6 shell jobs 1 , 2 ,3 4.5.6 and JobChain1 has 2 shell jobs. If the Job 3 in the JobChain0 end succesfully then JobChain1 should be started.
Configure a job chain with return codes
This can be achieved by configuring the return code for the job node
- Screenshot 1 : Open the
JobChain0in the JOE
- Screenshot 1: Select the
Job3, since we want to start the
JobChain1after if the
- Screenshot 2 : Give the return code e.g
. return code = 0is success in the ReturnCodes text filed
- Screenshot 2 : Select the target job chain e.g.
JobChain1from the drop down list ( only job chains present the same folder will be available in the dropdown list )
- Screenshot 2 : Click on Add Order button to assign the an Order to the
- Screenshot 2 : Click on Apply to make the changes in the job chain configuration
- Screenshot 2 : Save your job chain configuration.
Download : JobChainReturnCodes Examplethe working examples ( Windows Version ), for Linux simply change the job's shell scripts with Linux scripts
Start one or multiple job chains
Start multiple job chains ( split and sync back )
Assign Unique Order IDs
Example Exit code range