Sleep/Pause on the command line

Vote This Post DownVote This Post Up (+1 rating, 1 votes)
Loading ... Loading ...

A quick simple way to make the command line stop executing for a certain amount of time is by put

Everyone once in a while I need a way to stop the command line from executing for a certain number of seconds. By putting the 2 below lines in to a sleep.bat file I am able to create this functionality.

@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul

In order to use this I just type “sleep 10″ which will mimic a pause for 10 seconds (really it runs a ping in the background for 10 seconds).



Leave a Reply