Solved

Schedule Services to Start and Stop

Posted on 2006-10-23
4
3,066 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
ID: 17789982
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
ID: 17790018
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
ID: 17790185
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
ID: 17790212
no, save as a .cmd or .bat file.  But otherwise, yes.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 2000 Print Server 2 1,018
Windows 2000 Sever Lab Setup 1 665
Windows Explorer and WinZXip 4 504
DNS server query - zone verus cache 5 170
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…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

16 Experts available now in Live!

Get 1:1 Help Now