How to terminate a job automatically when its containing box is terminated

Document ID : KB000094233
Last Modified Date : 03/05/2018
Show Technical Document Details
Issue:
We have a job running inside an outer box. We want the job to be terminated automatically in case the outer box is completed with Failure or Terminated status.

Example:

Box1 contains Job1, Job2, Job3, Job4, Job5, Job6, Job7, Job8, Job9

We want Job2 to be terminated automatically in case Box1 completed with Failure or Terminated status.

 
Environment:
WAAE 11.3.6 SPx Release
Resolution:
The solution is to add the "job_terminator" attribute to the job definition.

Example:

insert_job: Job2
box_name: Box1
job_type: CMD
command: ........
machine: ........
job_terminator: y  < =======

This attribute will allow to terminate automatically Job2 in case the outer box (Box1) completes with Failure or Terminated status.

You can use this attribute along with the "box_terminator" attribute to control nested jobs behavior.