Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

TaskSettings.ExecutionTimeLimit property

For scripting, gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. You can change this by changing this setting.

This property is read/write.


TaskSettings.ExecutionTimeLimit As String

Property value

The amount of time that is allowed to complete the task. 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). A value of PT0S will enable the task to run indefinitely. When this parameter is set to Nothing, the execution time limit is infinite.


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


Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Type library




See also

Task Scheduler



Build date: 11/16/2013

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.