Muokkaa

Jaa


Period Element

Specifies how often the task needs to be started during Automatic maintenance.

The format for this string is PnYnMnDTnHnMnS, where nY is the number of years, nM is the number of months, nD is the number of days, T is the date/time separator, nH is the number of hours, nM is the number of minutes, and nS is the number of seconds (for example, "PT5M" specifies 5 minutes and "P1M4DT2H5M" specifies one month, four days, two hours, and five minutes). The minimum value is one minute. For more information about the duration type, see XML Schema Part 2: Datatypes Second Edition.

<xs:element name="Period"
    maxOccurs="1"
    minOccurs="1"
>
    <xs:simpleType>
        <xs:restriction
            base="duration"
        >
            <xs:minInclusive
                value="P1D"
             />
        </xs:restriction>
    </xs:simpleType>
</xs:element>

The Period element is defined by the maintenanceSettingsType complex type.

Parent element

Element Derived from Description
MaintenanceSettings (maintenanceSettingsType) maintenanceSettingsType Specifies the task settings the Task scheduler will use to start task during Automatic maintenance.

Remarks

For C++ programming, this idle setting is specified using the IMaintenanceSettings::Period property.

Examples

The following XML defines maintenance task with periodicity requirement set to 5 days.

<MaintenanceSettings>
    <Period>P5D</Period>
</MaintenanceSettings>

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