I have a batch script which starts a program that runs in cmd.exe I have tried using task scheduler to create a task which stops this cmd shell and starts a fresh one every hour to no avail. Are there any other ways to stop and start the same cmd and batch script every hour?
I tried making another batch with the following:
Taskkill /IM cmd.exe
and scheduling that to run every hour but since this batch also runs in a cmd shell it simply kills itself and not the previously running cmd shell.
Any help acheiving the stopping and restarting of the same cmd shell every x intervals would be greatly appreciated.
The reason I want to restart this program every x intervals is because this particular program tends to hang, it may hang after 10 minutes or 10 hours. As a precaution i'd like to have it restart every hour.