Count (restartType) Element

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

<xs:element name="Count">
    <xs:simpleType>
        <xs:restriction
            base="unsignedByte"
        >
            <xs:minInclusive
                value="1"
             />
        </xs:restriction>
    </xs:simpleType>
</xs:element>

The element is defined by the restartType complex type.

Parent element

Element Derived from Description
RestartOnFailure restartType Specifies that the Task Scheduler will attempt to restart the task if the task fails for any reason.

Remarks

If this element is specified, the Interval element must also be specified to tell the Task Scheduler how long to attempt to restart the task.

For C++ development, see RestartCount Property of ITaskSettings.

For script development, see TaskSettings.RestartCount.

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