When a windows service unexpectedly exits, it can be nice to have it try to restart itself. You can do this from the CMD prompt instead of wading through the computer management applet with the following command:
sc \\<server_name> failure <service_name> actions= restart/60000/restart/60000/restart/60000 reset= 0
This configures the failure action for the <service_name> service on <server_name> server to restart when it unexpectedly fails on the first failure, the second failure, and all subsequent failures after a 60 second wait (the restart/60000 pairs represent the three recovery stages). It sets the failure counter so it does not reset.
No comments:
Post a Comment