Run post job script even when the main task is failed

As far as I know, you need something like an Event script for this. You can catch job and task errors pretty easily, and do whatever status updates you need from there. Just be aware of some pitfalls like what I’ve outlined here.

On a side-note, I personally think you might want to reconsider what you put in the post-job script if you also want it to run on failure. You can do whatever you want of course, but handling checkins/versions/API communication and hooking on further processing of successful jobs seems to me the best use for post-job scripts.

1 Like