Returning run status to Wub 7 task scheduler

JTH

New member
Joined
Jan 13, 2012
Messages
2
Location
Tallahassee, FL
Programming Experience
10+
I have a VB program that is executed each morning at 4 AM by Task Scheduler. If the program returns anything other than a zero result, I would like Task Scheduler to run it again. The Task Scheduler sees my return code in the "Last Run Result" field, but does not invoke the "If task fails, restart every:" action. What am I missing?

Thanks for your help.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,465
Location
Norway
Programming Experience
10+
That setting seems to mean "if task fails to start, then restart". So if task starts, and completes with a non-zero error code or even fails by throwing exception (which sets some error code too), it still has successfully started and completed.
You may be able to do this by adding an event trigger to the task.
 
Top Bottom