How can I run a second script, which restarts my main program if got a critical error and stops working? Or just restarting the program every n seconds regardless if it is running or stopped responding?
As I understood, I cant do it in one program, because if it stops, it will not be able to restart itself.
Second script, restarting main script
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Second script, restarting main script
Well if you compile your script to a .exe you could have a second .exe kill the process of the first, and restart it. Easy to do every n seconds, but if you want to detect it being stuck that depends what makes it look stuck as to what you can detect.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?