Duration (repetitionType) Element
Specifies how long the pattern is repeated. 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). For more information about the duration type, see https://go.microsoft.com/fwlink/p/?linkid=106886. If no value is specified for the duration, then the pattern is repeated indefinitely. The minimum value is one minute.
<xs:element name="Duration"
minOccurs="0"
>
<xs:simpleType>
<xs:restriction
base="duration"
>
<xs:minInclusive
value="PT1M"
/>
</xs:restriction>
</xs:simpleType>
</xs:element>
The element is defined by the repetitionType complex type.
Parent element
Element | Derived from | Description |
---|---|---|
Repetition | repetitionType | Specifies how often the task is run and how long the repetition pattern is repeated after the task is started. |
Remarks
For scripting applications, the duration of the pattern is specified using the RepetitionPattern.Duration property.
For C++ applications, the duration of the pattern is specified using the IRepetitionPattern::Duration property.
Examples
The following XML defines a repetition pattern for a trigger.
<Repetition>
<Interval></Interval>
<Duration></Duration>
<StopAtDurationEnd>true</StopAtDirationEnd>
</Repetition>
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |