A job ran to FAILED even when the exit code was within the values for success_codes.

Document ID : KB000018744
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

A job ran to FAILED even when the exit code was within the values for the success_codes job attribute.

Solution:

Example:

insert_job: rc1
command: sleep 999
machine: localhost
Once it is running, run ps -ef|grep sleep to find the sleep 999's pid.
Then run kill -9 <pid>.
The job fails with an RC of 137.
Modify the job definition to include the following attribute:
success_codes: 0,137

Rerun the same test and this time the job should run to success even after the sleep is killed.

The job definition setting 'term_run_time' tells autosys that after x number of mins terminate the job.
This status of TERMINATED over-rules the success_codes.
Try setting success_codes to 0,1,9,137 and setting term_run_time to 1 min.
The job will run to FAILED/TERMINATE even when the exit code was 9, that was included in the success_codes attribute.
This is expected behavior as a self termination or program abort is treated as a failure regardless of what is specified in the success_codes jobattribute.