Restart a failed program
Posted on 2006-11-28
I am running Mercury mail on my windows PC.
Occasionally it will stop running.
I need a script that I can schedule to run every 30 minutes that will:
1. check the running processes for mercury.exe
2. If mercury.exe is in the running processes, do nothing and go back to sleep
3. If mercury.exe is not found in the running prcesses, restart mercury.exe (i.e. c:\mercury\mercury.exe)
4. Rerun step 2
4. Output actions to a log file