WORK IN PROGRESS

 

 

Introduction

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.

 

Issues

This feature support is subject to the following issues:

Key Summary T Created Updated Due Assignee Reporter P Status Resolution Fix Version/s
Loading...
Refresh

 

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 cleanup_files 

 

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

  1. Screenshot 1 : Open the JobChain0 in the JOE 
  2. Screenshot 1: Select the Job3 , since we want to start the JobChain1 after if the Job3 ends successfully 
  3. Screenshot 2 : Give the return code e.g. return code = 0 is success in the ReturnCodes text filed 
  4. Screenshot 2 : Select the target job chain e.g. JobChain1  from the drop down list  ( (warning) only job chains present the same folder will be available in the dropdown list ) 
  5. Screenshot 2 : Click on Add Order button to assign the an Order to the JobChain1 
  6. Screenshot 2 : Click on Apply to make the changes in the job chain configuration
  7. Screenshot 2 : Save your job chain configuration. 

 

Screenshot 1

 

 

Screenshot 2

 

Example Files 

Download   : JobChainReturnCodes Examplethe working examples ( Windows Version ), for Linux simply change the job's shell scripts with Linux scripts 

 

Use Cases

Start one or multiple job chains

Start multiple job chains ( split and sync back )

Assign Unique Order IDs

Parameter handling

Example Exit code range

 

  • No labels