I have a cmd file which executes an application (exe) that can return a specific error code in some cases. This cmd is launched by the Scheduler every day.
If it failed with this specific error, I want to be able to reschedule and retry the task every 30mn up to 3 times or for the next 2 hours before giving up until the next day.
How can I pass the error code to the scheduler to have it retry automatically (if at all possible) or how can I create a new temporary fail-over scheduled task from the initial cmd?
It should run mainly on Win2003 and Win2008 servers (x32 or x64).