This script acknowledges all failed instances for the executing job. It can be used to automatically acknowledge previous failures for the job when the job succeeds
Note: The user account the job is running under must have an adTempus login with permission to execute the job. This is necessary so the API can acknowledge the instances.
Create a new Shared Script named "Acknowledge all instance for executing job". Set the language to C# and paste in the sample code as the script body. Click OK to save the script.
Edit the job where you want to use the script. Add a Response with an event to trigger it on successful exection. Add a script action and select the new Shared Script as the script to execute.
When the job succeeds and the script is invoked, it gets the identity of the job, then uses the API to fetch the job and acknowledge all failed instances.