Set Up Recovery Actions to Take Place When a Service Fails
Applies To: Windows Server 2008
If a service fails, you can use the Services snap-in to specify what action to take on the first or second service failure, or on subsequent failures (for example, running a program or script). Membership in Account Operators, Domain Admins, Enterprise Admins, or equivalent, is the minimum required to complete this procedure. Review the details in "Additional considerations" in this topic.
To set up recovery actions to take place when a service fails
In the details pane, right-click the service for which you want to set up recovery actions, and then click Properties.
On the Recovery tab, click the action that you want in First failure, Second failure, and Subsequent failures, and then click OK:
If you click Run a Program, under Run program, type the absolute path for the specified computer. Universal Naming Convention (UNC) names are not supported. For example, type C:\scripts\handlefailure.cmd, rather than \\computername\c$\scripts\handlefailure.cmd. Programs or scripts that you specify should not require user input.
If you click Restart the Computer, click Restart Computer Options to specify how long the computer waits before restarting. You can also create a message to send automatically to remote users before the computer restarts.
Select Enable actions for stops with errors in order to trigger the recovery actions that the service stopped with an error.
To perform this procedure, you must be a member of the Account Operators group, the Domain Admins group, the Enterprise Admins group, or you must have been delegated the appropriate authority. As a security best practice, consider using Run as to perform this procedure.
Recovery actions are available only on computers running Windows 2000, Windows XP, Windows Server 2003, Windows Vista, or Windows Server 2008.