Specifying custom exit codes for successful job completion
By default, for a job to complete successfully, the exit code must be 0. Any other exit code indicates the job failed.
In some cases, however, you may want to use exit codes to pass information to subsequent work items and may want to use numbers other than 0 to indicate success.
You can do so by specifying these exit codes in the Job Definition dialog, Job Script Definition dialog, Manual Job Definition dialog, or Local Job Definition dialog, Non-zero success exit codes field.
This feature applies to LSF® jobs, job scripts, local jobs, and manual jobs.
When you define custom success exit codes:
- 0 is always a success exit code, and is the default success exit code. You do not need to specify it.
- You can specify one number or a list of numbers separated by spaces, from 1 to 255.
- You can use user variables in the Non-zero success exit codes field. If the user variable cannot be resolved at runtime, it is ignored.
- When a job exits with 0 or any other specified success exit code, the job is considered successful and receives the Done state.
- When a job exits with an exit code other than 0 or the specified success exit codes, the job is considered to have failed and receives the status Exited.
- If you specify an application profile and SUCCESS_EXIT_VALUES is defined in lsb.applications for the application, SUCCESS_EXIT_VALUES is ignored.
- If a job is killed by a user in Process Manager or in LSF, custom success exit codes are ignored.
From Flow Editor
Procedure
- In Flow Editor, right-click on a job, job script, manual job, or local job, select Open Definition.
- In the Non-success exit codes field, enter the exit codes that represent successful completion of the job.