TR Dojo: Automatically restart a failed service in Windows 7
November 3, 2011, 11:05am PDT | Length: 00:04:10
Bill Detwiler shows you how to configure a Windows 7 service to automatically restart after it fails. Once you’ve watched this TR Dojo video, you can find a link to the original TechRepublic article and print the tip from our
Transcript
Bill Detwiler: Restarting a failed Windows service usuallyrequires a trip into the Service manager to manually kick start it or even acomplete system reboot. But, did you know there's a way to make Windows do thejob for you?
I'm Bill Detwiler, and during this episode of TR Dojo, I'llshow you configure a Windows 7 service to automatically restart after it fails.
When a critical service fails in Windows 7, it can stop yourusers dead in their tracks. And, while it's always a good idea for IT to noticethe failure and troubleshoot the underlying problem, sometimes you just need torestart the service as quickly as possible and get your users back up andrunning.
The Quickbooks database manager is an example of one suchservice. Should the DB service for Quickbooks Point of Sale or Financials stop,client machines will be unable to connect to the data file. This can meandisaster in a busy retail situation. Luckily, you use the Windows 7 Servicesmanager to restart the service automatically. Here's how.
Open the Services manager by clicking the Start button andentering, typing services.msc, in the search box, and hit Enter.
Locate the service you want to configure, here we're usingthe Quickbooks Point of Sale Database manager, and right-click it, and selectProperties. On the Service Properties windows, click the Recovery tab.
By using the three drop down menus at the top of tab, youcan specify what action Windows will take when the service fails for the first,second, and all subsequent failures. To set the service to restart, just selectRestart the Service from the drop-down menu.
Now, how often you attempt to restart the service willdepend on how flaky the service is. If the service is fairly reliable and wouldonly stop for critical reasons (and subsequent restarts could actually do moreharm than good), you should probably only try to restart the service after theFirst failure.
If you feel comfortable that restarting the service won'tcause any additional damage or obscure a potential serious problem, you canalso set the other drop downs to Restart.
You can even configure the machine to automatically restartafter a service failure by selecting Restart the Computer from the drop downmenus. With this option selected, click Restart Computer Options, to set thenumber of minutes before the restart happens and set up a message to send touser about the restart.
As with restarting the service, choosing this option is ajudgment call you must make on an individual basis. If this machine is aserver, it’s probably not a good idea to restart it upon the failure of anonmission critical service.
Once everything is configured the way you want, click OK toset the changes and close the Service Properties window.
Well that does it for this edition of TR Dojo. Thanks toTechRepublic blogger Jack Wallen, who put this tip together.
Just remember to use caution when automatically restartingservices. It's a great way to keep your users up and running, but it can alsomask a more serious problem than you need to address.
And as always, for more teachings on YOUR path to becomingan IT Ninja, visit trdojo.techrepublic.com, sign-up for our newsletter, orcheck me out on Twitter and Google+.
Thanks for visiting the TR Dojo.



