Bewerken

Delen via


WaitTimeout (idleSettingsType) Element

Specifies the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for this element, then the Task Scheduler service will wait indefinitely for an idle condition to occur. 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. The minimum time allowed is 1 minute.

<xs:element name="WaitTimeout"
    default="PT1H"
    minOccurs="0"
>
    <xs:simpleType>
        <xs:restriction
            base="duration"
        >
            <xs:minInclusive
                value="PT1M"
             />
        </xs:restriction>
    </xs:simpleType>
</xs:element>

The element is defined by the idleSettingsType complex type.

Parent element

Element Derived from Description
IdleSettings idleSettingsType Specifies how the Task Scheduler performs tasks when the computer is in an idle state.

Remarks

For script development, this idle setting is specified using the IdleSettings.WaitTimeout property.

For C++ development, this idle setting is specified using the IIdleSettings::WaitTimeout property.

Examples

The following XML defines an idle setting that waits 24 hours for an idle condition to occur.

<IdleSettings>
    <WaitTimeout>PT24H</WaitTimeout>
</IdleSettings>

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