IRepetitionPattern interface (taskschd.h)
Defines how often the task is run and how long the repetition pattern is repeated after the task is started.
Inheritance
The IRepetitionPattern interface inherits from the IDispatch interface.
Methods
The IRepetitionPattern interface has these methods.
IRepetitionPattern::get_Duration Gets or sets how long the pattern is repeated. (Get) |
IRepetitionPattern::get_Interval Gets or sets the amount of time between each restart of the task. (Get) |
IRepetitionPattern::get_StopAtDurationEnd Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of the repetition pattern duration. (Get) |
IRepetitionPattern::put_Duration Gets or sets how long the pattern is repeated. (Put) |
IRepetitionPattern::put_Interval Gets or sets the amount of time between each restart of the task. (Put) |
IRepetitionPattern::put_StopAtDurationEnd Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of the repetition pattern duration. (Put) |
Remarks
If you specify a repetition duration for a task, you must also specify the repetition interval.
If you register a task that contains a trigger with a repetition interval equal to one minute and a repetition duration equal to four minutes, the task will be launched five times. The five repetitions can be defined by the following pattern.
- A task starts at the beginning of the first minute.
- The next task starts at the end of the first minute.
- The next task starts at the end of the second minute.
- The next task starts at the end of the third minute.
- The next task starts at the end of the fourth minute.
When reading or writing XML for a task, the repetition pattern is specified using the Repetition element of the Task Scheduler schema.
Examples
For more information and example code for this property, see Daily Trigger Example (C++).
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | taskschd.h |