timeout
Windows CMD · Terminal · reference only
What it does
Waits the given number of seconds, or until a key is pressed. It is the usual way to pause a .bat script.
Syntax
timeout /t segundos [/nobreak]
Options and parameters
/t segundosSeconds to wait; up to 99999 are accepted.
/t -1Waits indefinitely until a key is pressed.
/nobreakIgnores key presses; it can only be interrupted with Ctrl+C.
> nulHides the countdown message.
Usage examples
timeout /t 10Waits 10 seconds or until a key is pressed.
timeout /t 5 /nobreakWaits 5 seconds without a key press interrupting it.
timeout /t -1Waits until a key is pressed.
timeout /t 3 > nulWaits 3 seconds without showing the countdown.
Notes and common mistakes
- Not to be confused with Linux's timeout command, which limits another program's running time.
- In consoles without input, such as some scheduled tasks, it can fail with an input redirection error.