Delay (registrationTriggerType) Element

Specifies the amount of time between when the task is registered and when the task is started. The format for this string is PnYnMnDTnHnMnS, where nY is the number of years, nM is the number of months, nD is the number of days, 'T' is the date/time separator, nH is the number of hours, nM is the number of minutes, and nS is the number of seconds (for example, PT5M specifies 5 minutes and P1M4DT2H5M specifies one month, four days, two hours, and five minutes). For more information about the duration type, see https://go.microsoft.com/fwlink/p/?linkid=106886.

<xs:element name="Delay"
    type="duration"
 />

The Delay element is defined by the registrationTriggerType complex type.

Parent element

Element Derived from Description
RegistrationTrigger registrationTriggerType Specifies a trigger that starts a task when the task is registered.

Remarks

For scripting development, the registration trigger delay is specified using the RegistrationTrigger.Delay property.

For C++ development, the registration trigger delay is specified using the IRegistrationTrigger::Delay property.

Examples

The following XML defines a registration trigger delay that allows a 5 minute delay between when the task is registered and when the task is started.

<BootTrigger>
    <StartBoundary>2005-01-01T08:00:00</StartBoundary>
    <EndBounadry>2007-01-01T08:00:00</EndBoundary>
    <Enabled></Enabled>
    <Repetition></Repetition>
    <ExecutionTimeLimit></ExecutionTimeLimit>
    <Delay>PT5M</Delay>
 </BootTrigger>

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]

See also

Task Scheduler Schema Elements

Task Scheduler