Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restart program automatically if it crashes in Windows?

How can I start my program automatically if it crashes on windows 2003 server? Sometimes my program just crashes, is there a way in windows or settings that I can set?

like image 680
Zahid Avatar asked Feb 18 '12 19:02

Zahid


1 Answers

The usual approach is to run what is known as a guardian process. This is a separate process, often a service, that monitors the state of the main process. When the guardian detects that the main service has died, it re-spawns it.

To the very best of my knowledge, there is not built in Windows functionality to do this for you.

like image 141
David Heffernan Avatar answered Oct 09 '22 21:10

David Heffernan