Rediger

Del via


MaintenanceSettings (maintenanceSettingsType) Element

Specifies how the Task Scheduler performs tasks during Automatic maintenance.

<xs:element name="MaintenanceSettings"
    type="maintenanceSettingsType"
    minOccurs="0"
 />

The MaintenanceSettings element is defined by the maintenanceSettingsType complex type.

Parent element

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

Child elements

Element Type Description
Deadline Specifies the amount of time after which the Task scheduler will attempt to start task during emergency Automatic maintenance, if it failed to complete during regular maintenance.
Exclusive boolean If set to true, the task will be started exclusively among other maintenance tasks.
Period Specifies how often the task needs to be started during Automatic maintenance.

Remarks

For C++ programming, this idle setting is specified using the ITaskSettings3::MaintenanceSettings property.

Examples

The following XML defines a settings element that instructs Task Scheduler to execute task once in 5 days during regular Automatic maintenance and if failed for 15 days, start attempting the task during the emergency Automatic maintenance.

<Settings>
    <MaintenanceSettings>
        <Period>P5D</Period>
        <Deadline>P15D</Deadline>
    </MaintenanceSettings>       
</Settings>

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]

See also

Task Scheduler Schema Elements

Task Scheduler