You have scheduled a procedure to run on a machine, and it has completed.
The procedure completed with a FAIL, however.
You see a message such as
ScriptName failed in THEN step 5
Check the Agent Procedure Log for additional details
There are many reasons that a procedure can fail, from a simple typo or file not found, to a more complex problem with the logic of a procedure.
When an agent procedure fails, the reason for this is recorded in the Agent Procedure Log.
Understanding why the procedure failed is 95% of the way to fixing it.
WORKAROUND / RESOLUTION
This is not a problem per se. It is the procedure engine's way of logging failures.
To see the cause of the issue,
1. go to the Agent Tab -> Agent logs page
2. select the agent in question
3. at the top of the page, select the Agent Procedure Log
4. look for the error message - you will see a more detailed explanation of the failure message
It can also be useful to look at the "Agent Log" as this also records certain messages.