Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto start/stop a service?

Status
Not open for further replies.
Apr 18, 2003
250
US
I need to stop a service for backup purposes and I was wondering, is there a utility I can use to schedule the stopping and starting of a service?
 
use a sheduled task to run a command batch file utilizing the NET STOP / NET START command
 
Does your backup software offer the option to run tasks pre and post backup? If so, configure the backup job to stop the service pre backup and restart the service post backup using the advice above. Don't forget, if the service name has spaces in, you have to put the name in quotes eg:

net stop "Gupta SQL Service"
net start "Gupta SQL Service"



--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
Probably need to break this up in to two commands and two scheduled tasks depending on your backup window
 
I created two batch files on the ADP server for stopping and starting the service. I then used them for two schedule tasks that are running on the same server.

This has solved my problem, although, is there a way to be notified when the service comes back up?
 
If you have a systems monitoring tool, you can create a snmp trap to notify you off this occurance.

You can also configure a service to run a program to alert you of a service failure; say when you tell it to start back up with your second script and it fails.

This is an old KB article, but may get you started.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top