Microsoft® Windows® Script Host
Sleep Method
WSH Reference
Version 2

Applies To


Description
Places the script process into an inactive state for the number of milliseconds specified and then continues execution.
Syntax
object.Sleep(intTime)
Parameters
Part Description
object WScript object.
intTime Amount of time in milliseconds that the script process will be inactive.
Remarks
Events handled by the script will still be executed during a sleep. If the script engine times out or is otherwise interrupted the sleep will terminate immediately.
Example
The following example makes the script inactive for 5 seconds:
WScript.Echo "Started"
WScript.Sleep 5000
WScript.Echo "Finished"