IRepetitionPattern interface

Defines how often the task is run and how long the repetition pattern is repeated after the task is started.

Members

The IRepetitionPattern interface inherits from the IDispatch interface. IRepetitionPattern also has these types of members:

Properties

The IRepetitionPattern interface has these properties.

PropertyAccess typeDescription

Duration

Read/write

Gets or sets how long the pattern is repeated.

Interval

Read/write

Gets or sets the amount of time between each restart of the task.

StopAtDurationEnd

Read/write

Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration.

 

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

Task Scheduler Interfaces
Task Scheduler
ITrigger
Repetition Property of ITrigger

 

 

Community Additions

ADD
Show:
© 2014 Microsoft