If users wish to have a Precheck job exit with a specific status the following can be used which will exit the precheck job with an Success Severity.
Or, for example,
$Host.SetShouldExit(<<JAMS.Message.CancelJobError>>) which will exit the precheck job with an Error Severity.
A Precheck Job has four options.
- It can loop, waiting for the prerequisites.
- It can exit with the status JAMS.Message.TryAgain and JAMS will resubmit the Precheck Job after the precheck interval has elapsed.
- It can exit with a bad status and JAMS will perform normal notification actions and then resubmit the Precheck job after the precheck interval has elapsed.
- It can exit with the status JAMS.Message.CancelJobX, where X is Success, Info, Warning, Error or Fatal and denotes the severity of the status. JAMS will cancel the Job which caused the Precheck to run and the final status of the Job which caused the Precheck to run will be the status which the Precheck Job returned.