...
The sleep command is used to pause execution of the script.
Two forms are available:
sleep seconds | Sleep for the specified number of seconds. |
sleep hh:mm | Sleep until an explicit time in the 24-hour clock. |
If an explicit time (hh:mm) is specified that already has occurred on the current day, the script will be paused until that time on the following day.
Parameters
...
cellspacing | 0 |
---|---|
style | margin-top: 3.0pt; text-align: left; width: 100%; |
class | Table_with_Header |
...
style | background-color: #F0F0F0; border-bottom-color: #E8E8E8; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: #E8E8E8; border-left-style: solid; border-left-width: 1px; border-right-color: #E8E8E8; border-right-style: solid; border-right-width: 1px; border-top-color: #E8E8E8; border-top-style: solid; border-top-width: 1px; padding-bottom: 3pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; vertical-align: middle; width: 144pt; |
---|
...
Parameter |
---|
...
...
Description |
---|
...
...
style | border-bottom-color: #E8E8E8; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: #E8E8E8; border-left-style: solid; border-left-width: 1px; border-right-color: #E8E8E8; border-right-style: solid; border-right-width: 1px; border-top-color: #E8E8E8; border-top-style: solid; border-top-width: 1px; padding-bottom: 3pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; vertical-align: top; |
---|
seconds |
...
style | border-bottom-color: #E8E8E8; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: #E8E8E8; border-left-style: solid; border-left-width: 1px; border-right-color: #E8E8E8; border-right-style: solid; border-right-width: 1px; border-top-color: #E8E8E8; border-top-style: solid; border-top-width: 1px; padding-bottom: 3pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; vertical-align: top; |
---|
Number of seconds to sleep. |
...
hh:mm |
...
...
style | border-bottom-color: #E8E8E8; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: #E8E8E8; border-left-style: solid; border-left-width: 1px; border-right-color: #E8E8E8; border-right-style: solid; border-right-width: 1px; border-top-color: #E8E8E8; border-top-style: solid; border-top-width: 1px; padding-bottom: 3pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; vertical-align: top; |
---|
Explicit time to sleep until (based on a 24-hour clock). If the specified time is in the past (based on the current local time in the 24-hour cycle when the sleep command is executed), the script will pause until the specified time on the following day. |
Examples
To pause execution for 10 seconds:
Panel |
---|
sleep 10
</pre>
|
...
To pause execution until 10:30 p.m.:
Panel |
---|
sleep 22:30
</pre>
|
...
Note | ||||
---|---|---|---|---|
| ||||
If the explicit time form of the sleep command (sleep hh:mm) is used in a loop (for example, forfiles), iterations following the first sleep command are likely to be in the past (perhaps by 1 second), causing some iterations to sleep until the next day. For example, consider the following loop:
If the |
...