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.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
[DefaultValueAttribute(typeof(TimeSpan), "3")]
public TimeSpan ExecutionTimeLimit { get; set; }

Property Value

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