Que outras formas existem de configurar timers em arquivos batch?
Você pode usar o comando timeout
no Windows 7 ou 8.
Delay execution for a few seconds or minutes, for use within a batch file.
Syntax
TIMEOUT delay [/nobreak]
Key
delay
Delay in seconds (between -1 and 100000) to wait before continuing. The value -1 causes the computer to wait indefinitely for a keystroke (like the PAUSE command)
/nobreak
Ignore user key strokes. (Windows 7 or greater)Timeout will pause command execution for a number of seconds, after which it continues without requiring a user keystroke. If the user does press a key at any point, execution will resume immediately.
Origem Tempo limite
Exemplos
To pause the command processor for ten seconds, type:
timeout /t 10
To pause the command processor for 100 seconds and ignore any keystroke, type:
timeout /t 100 /nobreak
To pause the command processor indefinitely until a key is pressed, type:
timeout /t -1
Source Technet Tempo limite
Leitura Adicional
- Um índice A-Z da linha de comando do Windows CMD - Uma excelente referência para todas as coisas relacionadas à linha do Windows cmd.