Delay execution for a few seconds/minutes (for use within a batch file.)
Syntax
SLEEP time
Key
time The number of seconds to pause
For example:
To pause for an hour before running the next command in a batch file:
SLEEP 3600
Alternative
A delay can also be produced by the PING command with a loopback address, in tests this consumes less processor time than Sleep.exe or Timeout.exe:
e.g. for a delay of 30 seconds:
PING -n 31 127.0.0.1>nul
See Clay Calvert's newsgroup posting for a full explanation of this technique.
“I think men talk to women so they can sleep with them and women sleep with men so they can talk to them” Jay McInerney
Related:
TIMEOUT - Delay execution for a few seconds/minutes (for use within a batch file.)
WAIT - the same as sleep but with noises
WAITFOR - Wait for or send a signal.
WScript.Sleep - Sleep
Powershell: Start-Sleep - Suspend shell, script, or runspace activity (sleep)
Equivalent bash command (Linux): sleep - Delay for a specified time