I have a backup task that fails with a non zero result, yet Task Scheduler says that it executed the task correctly.
Is there any way to tell Task Scheduler that the task failed?
If Task Scheduler successfully launches the task and the launched program exits, then from the point of view of the Task Scheduler it was a success (i.e., nothing bad happened like a failed user credential starting the program).
Normally if you want to monitor for something bad that happened during a program run you would either have the program send an alert of some sort (e.g., via email or by logging to a file that you later review), or else setup another program to monitor something about the program run that could indicate whether an error occurred.
What sort of notification of an error are you trying to get? Are you doing a manual review but just trying to have the error be more noticeable? Or do you have another program monitoring for errors?
It is possible to "restart" the task if it fails.
Be careful not to create an infinite loop.
Hope that helps!
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?