RestartOnFailure (settingsType) Element

Specifies that the Task Scheduler will attempt to restart the task if the task fails for any reason.

<xs:element name="RestartOnFailure"
    type="restartType"
    minOccurs="0"
 />

The RestartOnFailure element is defined by the settingsType complex type.

Parent element

ElementDerived fromDescription
Settings settingsType

Contains the settings that the Task Scheduler uses to perform the task.

Child elements

ElementTypeDescription
Count unsignedByte

Specifies the number of times that the Task Scheduler will attempt to restart the task.

Interval duration

Specifies how long the Task Scheduler will attempt to restart the task.

Remarks

When an application specifies task settings, this information is accessed through the RestartCount and RestartInterval properties of the ITaskSettings interface. For scripting, this information is accessed through the TaskSettings.RestartCount and TaskSettings.RestartInterval properties.

Both child elements must be set to specify how the Task Scheduler restarts the task.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

See also

Task Scheduler Schema Elements

 

 

Show: