Click or drag to resize
Task Scheduler Managed Class Library

TaskSettingsExecutionTimeLimit Property

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.

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
public TimeSpan ExecutionTimeLimit { get; set; }
Request Example View Source

Property Value

Type: TimeSpan
The amount of time that is allowed to complete the task. When this parameter is set to Zero, the execution time limit is infinite.
Remarks
If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it exceeds the ExecutionTimeLimit.
See Also