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.

  1. A task starts at the beginning of the first minute.
  2. The next task starts at the end of the first minute.
  3. The next task starts at the end of the second minute.
  4. The next task starts at the end of the third minute.
  5. The next task starts at the end of the fourth minute.
Windows Server 2003, Windows XP and Windows 2000:  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 four times.

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

See also

ITrigger

Repetition Property of ITrigger

Task Scheduler

Task Scheduler Interfaces