Schedule Services to Start and Stop

Under Administrative Tools there is Services.  I want to take a service and stop at a specific day to do a backup and the start it after the backup is done.  Is there a simple scheduler to start and stop a service for the day?
al4629740Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jimmymcp02Connect With a Mentor Commented:
use windows task schedule

First you need to create a batch file i will use my pcanywhere stop batch file

very simple create a bat file with the name stop pcanywhere and add this code to it

Net Stop "pcAnywhere Host Service"

the above will stop the pcanywhere host service
then you schedule the start

Net Start "pcAnywhere Host Service"

works great
0
 
jkrConnect With a Mentor Commented:
You can do that using W2k's builtin scheduler. Basically, create a .cmd (or .bat) file that is something like

net stop myservice
DoBackup.exe /somefancyargs
net start myservice

and schdule that to run at the time of your choice. Keep in mind that you should schedule the file to run under the Administrator (or any similar privileged) account. Just go to 'Run|Programs|Accessories|Scheduled Tasks' and follow the assitant to through the necessary steps.
0
 
al4629740Author Commented:
How do I create a batch file?

Do I just paste that into NotePad and then save it as a .vbs file?
0
 
Lee W, MVPConnect With a Mentor Technology and Business Process AdvisorCommented:
no, save as a .cmd or .bat file.  But otherwise, yes.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.