I am running a python script on a Windows machine via Autosys.
Currently I am calling the command in my Autosys job as such:
Autosys job definition to run Python script:
command: cmd /c "python myScript.py"
Python code exit snippet:
print("Actual threshold below tolerable limit, STOPPING PROCESS")
sys.exit(1)
I would like to fail the Autosys job when my Python script exits with code 1, however Autosys doesn't seem to care what the script's error code is and exits with status "Success" each time.
Any tips on how I might terminate the Autosys job with status "FA" when the script exits with code 1, much how we do in Bash?