Export (0) Print
Expand All

ITaskSettings::RestartInterval property

Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.

This property is read/write.

Syntax


HRESULT put_RestartInterval(
  [in]   BSTR restartInterval
);

HRESULT get_RestartInterval(
  [out]  BSTR *pRestartInterval
);

Property value

A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the RestartCount property must also be set. 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

When reading or writing XML for a task, this setting 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

ITaskSettings
Task Scheduler
ITaskSettings

 

 

Community Additions

ADD
Show:
© 2014 Microsoft