Pause for n seconds
Moderator: DosItHelp
-
- Posts: 44
- Joined: 01 Jan 2011 20:54
Pause for n seconds
Does anyone know of a way to have the script pause for n seconds? thanks.
Re: Pause for n seconds
Often used: PINGing the own machine:
... for a delay of 10 seconds (one more pings than seconds).
Regards
aGerman
Code: Select all
ping -n 11 localhost>nul
... for a delay of 10 seconds (one more pings than seconds).
Regards
aGerman
-
- Posts: 44
- Joined: 01 Jan 2011 20:54
Re: Pause for n seconds
How do the variables work?
Re: Pause for n seconds
Don't get it. There is no variable
-
- Posts: 44
- Joined: 01 Jan 2011 20:54
Re: Pause for n seconds
How to adjust the wait.
Re: Pause for n seconds
As I wrote: "one more pings than seconds".
number of pings = number of seconds + 1
It takes approx. 200ms to call ping.exe, thats why the delay is a little longer.
Regards
aGerman
number of pings = number of seconds + 1
Code: Select all
@echo off &setlocal
set /p "x=Enter the number of seconds: "
set /a x+=1
echo delay start %time%
ping -n %x% localhost>nul
echo delay end %time%
pause>nul
It takes approx. 200ms to call ping.exe, thats why the delay is a little longer.
Regards
aGerman
Re: Pause for n seconds
scienceguru1.bat
Need to create a 60 minutes delay
Need to create a 60 minutes delay
-
- Posts: 44
- Joined: 01 Jan 2011 20:54
Re: Pause for n seconds
thanks, everyone. i'll test it when i can get on my computer. it should work.
-
- Posts: 44
- Joined: 01 Jan 2011 20:54
Re: Pause for n seconds
Thanks everyone, it works