Skip to end of metadata
Go to start of metadata

Problem

I would like to emulate an AutoSys® max_exit_success. For example, a max_exit_success=10 means that

  • 0 signals success, 
  • > 10 signals failure and 
  • exit codes between 1 and 9 as a warning.

For a job chain this would mean:

  • 0 : next_state with exit 0
  • 1-9 : next_state with a real exit
  • >10 : error_state with a real exit

I tried to change the error_state with a next_state but this did not work. Could you give me a hint?

Solution

You can find instructions about handling exit codes on our How to configure the handling of exit codes by jobs page.

Here is another example:

A possible solution in PerlScript could be: