mkramer777
asked on
auto restart
I have an executable program that stops every once in awhile. Then I have to double click it to start again. Is there a way to auto restart this program? It is on a windows 2012 server. It does not have a service to start it.
How quickly do you notice that it has stopped? Can you start it using a scheduled task?
ASKER
How would a scheduled task know to run the task when the program has stopped?
Your scheduled task could be to run a batch file which first of all checks to see if the executable is already running, and if not, starts it...
http://stackoverflow.com/questions/162291/how-to-check-if-a-process-is-running-via-a-batch-script
Set the task to run as often as you want / need
http://stackoverflow.com/questions/162291/how-to-check-if-a-process-is-running-via-a-batch-script
Set the task to run as often as you want / need
ASKER
Without reading everything on the link, what part can I copy and paste as a batch file that will start the executable if it sees it is not started?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I got it to work. How would I set a schedule to run the task every hour? Do I need to create a task for each hour?
No - in the scheduled task trigger, you can specify that the task repeats every 1 hours
ASKER
Worked perfectly. Thanks!