How do I pause 10 seconds in batch file?

  • Thread starter Thread starter Cyborg
  • Start date Start date
C

Cyborg

I want to have a batch file stop a service then wait 10 seconds before
restarting it again, what is the command.

Net stop service
pause 10
Net start service
 
Cyborg said:
I want to have a batch file stop a service then wait 10 seconds before
restarting it again, what is the command.

Net stop service
pause 10
Net start service

Try this:

Net stop service
ping localhost -n 11 > nul
Net start service
 
In
Cyborg said:
I want to have a batch file stop a service then wait 10 seconds before
restarting it again, what is the command.

Net stop service
pause 10
Net start service

Sleep.exe (from the resource kit, I believe).

net stop service
sleep 10
net start service
 
How do I get te command line to recognize sleep? I have dowloaded these
reskit.


"Lanwench [MVP - Exchange]"
 
In
Gonzo said:
How do I get te command line to recognize sleep? I have dowloaded
these reskit.

If you downloaded rktools.exe, you need to run/install it. It should add the
installation location to your system path (reboot if it doesn't) and you
should be able to run it from a command line in any folder.
"Lanwench [MVP - Exchange]"
In

Sleep.exe (from the resource kit, I believe).

net stop service
sleep 10
net start service
 
Back
Top