Batch to reboot if program stops responding

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Matticus117
Posts: 3
Joined: 19 Oct 2013 09:24

Batch to reboot if program stops responding

#1 Post by Matticus117 » 22 Oct 2013 08:14

I am very new to writing batch files. I have program that is running constantly at work. The program keeps freezing up throughout the day. There are several of these kiosks that have this problem all at different various locations across the province. They run on touchscreen and the computer that runs and keyboard are locked up so it is a bit of trouble for them to get to the computer and keyboard to reboot it.
I was wondering if anyone could help me write a batch file that will check every 15 minutes to see if the program is frozen. If the program is active I would like the batch file to keep looping every 15 minutes. If the program is frozen or not responding I would like the batch file to reboot the computer. Any help that can be given would be much appreciated. Thank you in advance.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Batch to reboot if program stops responding

#2 Post by foxidrive » 22 Oct 2013 10:15

It might be enough to simply kill and restart the program every hour.

Edit With a batch file I mean.

Do you think that would work?

Batch Artist
Posts: 22
Joined: 18 Oct 2013 05:28

Re: Batch to reboot if program stops responding

#3 Post by Batch Artist » 23 Oct 2013 03:44

Matticus117 wrote:I am very new to writing batch files. I have program that is running constantly at work. The program keeps freezing up throughout the day. There are several of these kiosks that have this problem all at different various locations across the province. They run on touchscreen and the computer that runs and keyboard are locked up so it is a bit of trouble for them to get to the computer and keyboard to reboot it.
I was wondering if anyone could help me write a batch file that will check every 15 minutes to see if the program is frozen. If the program is active I would like the batch file to keep looping every 15 minutes. If the program is frozen or not responding I would like the batch file to reboot the computer. Any help that can be given would be much appreciated. Thank you in advance.


Hmm, it is possible but it will take time to think of a way.
You could create a separate batch file that searches a specific directory for the batch file that you want to run, than the batch file that checks the directory can be on a timer. So every 15mins it will open that batch file you want again. And it will keep going on a cycle.

I will work on it ;)

Matticus117
Posts: 3
Joined: 19 Oct 2013 09:24

Re: Batch to reboot if program stops responding

#4 Post by Matticus117 » 24 Oct 2013 07:54

foxidrive wrote:It might be enough to simply kill and restart the program every hour.

Edit With a batch file I mean.

Do you think that would work?


I was thinking about that originally. It is possible but the powers that be want the computer to reboot.

Matticus117
Posts: 3
Joined: 19 Oct 2013 09:24

Re: Batch to reboot if program stops responding

#5 Post by Matticus117 » 24 Oct 2013 08:03

Batch Artist wrote:
Matticus117 wrote:I am very new to writing batch files. I have program that is running constantly at work. The program keeps freezing up throughout the day. There are several of these kiosks that have this problem all at different various locations across the province. They run on touchscreen and the computer that runs and keyboard are locked up so it is a bit of trouble for them to get to the computer and keyboard to reboot it.
I was wondering if anyone could help me write a batch file that will check every 15 minutes to see if the program is frozen. If the program is active I would like the batch file to keep looping every 15 minutes. If the program is frozen or not responding I would like the batch file to reboot the computer. Any help that can be given would be much appreciated. Thank you in advance.


Hmm, it is possible but it will take time to think of a way.
You could create a separate batch file that searches a specific directory for the batch file that you want to run, than the batch file that checks the directory can be on a timer. So every 15mins it will open that batch file you want again. And it will keep going on a cycle.

I will work on it ;)


Thank you. I still very new to this stuff so any help would be great.

Post Reply