<sleep>

A task for sleeping a specified period of time, useful when a build or deployment process requires an interval between tasks.

Parameters

Attribute Type Description Required
hours int
Hours to add to the sleep time.
False
milliseconds int
Milliseconds to add to the sleep time.
False
minutes int
Minutes to add to the sleep time.
False
seconds int
Seconds to add to the sleep time.
False
failonerror bool
Determines if task failure stops the build, or is just reported. The default is true.
False
if bool
If true then the task will be executed; otherwise, skipped. The default is true.
False
unless bool
Opposite of NAnt.Core.Task.IfDefined. If false then the task will be executed; otherwise, skipped. The default is false.
False
verbose bool
Determines whether the task should report detailed build log messages. The default is false.
False

Examples

Sleep 1 hour, 2 minutes, 3 seconds and 4 milliseconds.

<sleep hours="1" minutes="2" seconds="3" milliseconds="4" />

Sleep 123 milliseconds.

<sleep milliseconds="123" />

Requirements

Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Tasks