Duration (idleSettingsType) Element
Specifies how long the computer must be in an idle state before the task is run. 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). The minimum value is one minute. For more information about the duration type, see https://go.microsoft.com/fwlink/p/?linkid=106886.
<xs:element name="Duration"
default="PT10M"
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 programming, this idle setting is specified using the IdleSettings.IdleDuration property.
For C++ programming, this idle setting is specified using the IIdleSettings::IdleDuration property.
Examples
The following XML defines an idle setting that allows 5 minutes for the task to start.
<IdleSettings>
<Duration>PT5M</Duration>
</IdleSettings>
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |