Batch file for restarting a service

Associate
Joined
8 Jul 2004
Posts
1,818
Location
London
What kind of commands do I need in a batch file to force it to restart service "X" on a server every 2 days?

OS: Windows 2003 Enterprise SP1
 
You can just setup a scheduled task (running under the necessary privileges) to run a batch file which does:-

Net Stop "X"
Net start "X"

But find out the name of the service first, by opening it service properties, the name is not always as it appears in the services.msc snap-in.
 
Back
Top Bottom