Muokkaa

Jaa


RestartOnIdle (idleSettingsType) Element

Specifies whether the task is restarted when the computer cycles into an idle condition more than once.

<xs:element name="RestartOnIdle"
    type="boolean"
    default="false"
    minOccurs="0"
 />

The RestartOnIdle 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

This element is used only if the TerminateOnIdleEnd element is set to True.

For script development, this task settings is specified using the IdleSettings.RestartOnIdle property.

For C++ development, this task settings is specified using the IIdleSettings::RestartOnIdle property.

Examples

The following XML defines an idle setting that indicates that the task should not be restarted when the idle condition cycles.

<IdleSettings>
     <TerminateOnIdleEnd>true</TerminateOnIdleEnd>
     <RestartOnIdle>true</RestartOnIdle>
</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