Kev, 

You can do something like:

@ECHO OFF
NET STOP SQLSERVERAGENT
NET STOP MSSQLSERVER
In one batch

And 

@ECHO OFF
NET START MSSQLSERVER
NET START SQLSERVERAGENT
In another batch file


Save the first one as STOP.bat and the second as START.bat -- you would
substitute the service name for whatever else you want to stop. 
Place the files somewhere - schedule the task --- point the task to the
batch files.


Sorry if that last part was too remedial buddy -- I never know when to
stop talking.






-----Original Message-----
From: Kevin Felker [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 11, 2002 2:17 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] OT: How to schedule a service to stop and
restart?

That sounds easy, but what do I put in the batch file, someone earlier
said to use vbs scripts, do I create a vbs file and put the file name in
the batch file?

-----Original Message-----
From: Craig Cerino [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 11, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] OT: How to schedule a service to stop and
restart?

Kevin -- if you creat a small batch file (.bat)  to stop and one to
start the services in question -- - you can just schedule tasks through
scheduler to kick off those batch files. 1-2-6 yer done 

-----Original Message-----
From: Kevin Felker [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 11, 2002 12:47 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] OT: How to schedule a service to stop and restart?

All,

I'm trying to do a system backup of my server, but not all of it is
backing up since certain services are running (such as SQL SERVER).

If I have my backup scheduled for 3:00AM, I would like to stop the SQL
SERVER Service at 2:50AM, and restart it at 4:00AM.

What is the best way to do this?

Thanks

Kevin
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to