Bewerken

Delen via


IdleSettings (settingsType) Element

Specifies how the Task Scheduler performs tasks when the computer is in an idle state. For information about idle conditions, see Task Idle Conditions.

<xs:element name="IdleSettings"
    type="idleSettingsType"
    minOccurs="0"
 />

The IdleSettings element is defined by the settingsType complex type.

Parent element

Element Derived from Description
Settings settingsType Contains the settings that the Task Scheduler uses to perform the task.

Child elements

Note

The Duration and WaitTimeout settings are deprecated. They're still present in the Task Scheduler user interface, and their interface methods may still return valid values, but they're no longer used.

Element Type Description
RestartOnIdle boolean Specifies whether the task is restarted when the computer cycles into an idle condition more than once.
StopOnIdleEnd boolean Specifies that the Task Scheduler will stop the task if the idle condition ends before the task is completed.
Deprecated: Duration duration Specifies how long the computer must be in an idle state before the task is run.
Deprecated: WaitTimeout duration Specifies the amount of time that the Task Scheduler will wait for an idle condition to occur.

Remarks

For script development, idle settings are specified using the TaskSettings.IdleSettings property.

For C++ development, idle settings are specified using the ITaskSettings::IdleSettings property.

Examples

The following XML defines a settings element that allows Task Scheduler to wait 24 hours for an idle condition and then allows only 10 minutes {IdleDuration) to initiate the task.

<Settings>
    <IdleSettings>
        <StopOnIdleEnd>false</StopOnIdleEnd>
        <RestartOnIdle>false</RestartOnIdle> 
        <!-- WaitTimeout and Duration have been deprecated -->
        <Duration>PT5M</Duration>
        <WaitTimeout>PT24H</WaitTimeout>
    </IdleSettings>       
</Settings>

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