How can I stop a service

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
timle

How can I stop a service

Post by timle » Sat Apr 17, 2004 8:47 pm

Could I use scheduler to stop a service in win2000 and run some task then turn the service back on?

Thank you very much

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Apr 17, 2004 9:56 pm

As long as you are logged in with access rights to the programs/folders, etc. you could use Macro Scheduler. But this is not a service itself and scheduled events won't run if not loggeed in.

But you may be able to use your Task Scheduler to call Macro Scheduler routines.

If you can provide more specifics, then we can provide a more specific sensible solution. Will you be logged in? What service do you want to stop? What service to you want to run?

I have a Macro Scheduler backup task as an icon on the desktop of a 2K system. The system is normally logged out. I use my local machine with a scheduled Macro Scheduler task to start pcAnyWhere from this remote site, connect to the 2K pcAnyWhere Host (a service on 2K), log in to the 2K system, use MouseMove to double click the desktop Macro Scheduler icon. When that Macro Scheduler task is done, then the original Macro Scheduler logs out of the 2K system, and disconnects pcAnyWhere connection.

These Macro Scheduler routines run every night, scheduled, unattended, perform remote backups, sending off emails re the results to 3 individuals, and also creates logs on these activities.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Sun Apr 23, 2006 9:26 pm

One simple answer;

Run>net stop blah
Run>net start blah

I am currently tweaking my own usage of this, so it performs the start/stop action via a nice clean VBScript.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts