Solved

Schedule Services to Start and Stop

Posted on 2006-10-23
4
3,065 Views
Last Modified: 2008-08-05
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?
0
Comment
Question by:al4629740
4 Comments
 
LVL 20

Accepted Solution

by:
jimmymcp02 earned 300 total points
Comment Utility
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
 
LVL 86

Assisted Solution

by:jkr
jkr earned 100 total points
Comment Utility
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
 

Author Comment

by:al4629740
Comment Utility
How do I create a batch file?

Do I just paste that into NotePad and then save it as a .vbs file?
0
 
LVL 95

Assisted Solution

by:Lee W, MVP
Lee W, MVP earned 100 total points
Comment Utility
no, save as a .cmd or .bat file.  But otherwise, yes.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now