IRepetitionPattern::Interval property

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

This property is read/write.

Syntax


HRESULT put_Interval(
  [in]  BSTR interval
);

HRESULT get_Interval(
  [out] BSTR *pInterval
);

Property value

The amount of time between each restart of the task. The format for this string is P<days>DT<hours>H<minutes>M<seconds>S (for example, "PT5M" is 5 minutes, "PT1H" is 1 hour, and "PT20M" is 20 minutes). The maximum time allowed is 31 days, and the minimum time allowed is 1 minute.

Error codes

NameMeaning
S_OK

The property value was successfully set or retrieved.

Remarks

If you specify a repetition duration for a task, you must also specify the repetition interval.

When reading or writing XML for a task, the repetition interval is specified in the Interval element of the Task Scheduler schema.

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
IRepetitionPattern

 

 

Show: