Application Watchdog
-
Is there such a thing as a program that watches to make sure another program is running OK, and if it crashes, restarts it? What is the preferred mechanism by which such a thing would be implemented? (Not asking for code, just some ideas)
The difficult we do right away... ...the impossible takes slightly longer.
-
Is there such a thing as a program that watches to make sure another program is running OK, and if it crashes, restarts it? What is the preferred mechanism by which such a thing would be implemented? (Not asking for code, just some ideas)
The difficult we do right away... ...the impossible takes slightly longer.
This is usually done by having a Windows service that watches over your program. There are several such programs available - Search for Application Watchdog[^] Windows from Vista onward also supports Application Recovery and Restart[^] that you can use to have Windows restart your application in case of an unhandled exception.
«_Superman_» _I love work. It gives me something to do between weekends.
-
This is usually done by having a Windows service that watches over your program. There are several such programs available - Search for Application Watchdog[^] Windows from Vista onward also supports Application Recovery and Restart[^] that you can use to have Windows restart your application in case of an unhandled exception.
«_Superman_» _I love work. It gives me something to do between weekends.
Thanks, Superman. :thumbsup:
The difficult we do right away... ...the impossible takes slightly longer.
-
Is there such a thing as a program that watches to make sure another program is running OK, and if it crashes, restarts it? What is the preferred mechanism by which such a thing would be implemented? (Not asking for code, just some ideas)
The difficult we do right away... ...the impossible takes slightly longer.
Developing whatch dog on windows is very easy, all you need to create a named mutex from the process (program) needed to moniter, and from your moniter process, wait for that mutex handle to be closed. If it get closed than restart your program. If you are a Linux user than crontab is your friend, use crontab instead of develop new watchdog so that you can spent time to find out why you program is crashing. On windows you can use cronw. Good Luck.