Rediger

Del via


TaskSettings.DeleteExpiredTaskAfter property

For scripting, 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

TaskSettings.DeleteExpiredTaskAfter As String

Property value

A string that gets or 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).

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 objects.

When reading or writing XML for a task, this setting is specified in the DeleteExpiredTaskAfter (settingsType) element of the Task Scheduler schema.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

Task Scheduler