ITaskSettings::DeleteExpiredTaskAfter property

Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this property, then the Task Scheduler service will not delete the task.

This property is read/write.

Syntax


HRESULT put_DeleteExpiredTaskAfter(
  [in]  BSTR expirationDelay
);

HRESULT get_DeleteExpiredTaskAfter(
  [out] BSTR *pExpirationDelay
);

Property value

A string that gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. The format for this string is PnYnMnDTnHnMnS, where nY is the number of years, nM is the number of months, nD is the number of days, 'T' is the date/time separator, nH is the number of hours, nM is the number of minutes, and nS is the number of seconds (for example, PT5M specifies 5 minutes and P1M4DT2H5M specifies one month, four days, two hours, and five minutes).

Error codes

NameMeaning
S_OK

The property value was successfully set or retrieved.

Remarks

A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the EndBoundary property inherited by all trigger interfaces.

When reading or writing XML for a task, this setting is specified in the DeleteExpiredTaskAfter (settingsType) 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

 

 

Show: