Share via


TaskConstraints Class

Definition

Execution constraints to apply to a Task.

public class TaskConstraints
type TaskConstraints = class
Public Class TaskConstraints
Inheritance
TaskConstraints

Constructors

TaskConstraints()

Initializes a new instance of the TaskConstraints class.

TaskConstraints(Nullable<TimeSpan>, Nullable<TimeSpan>, Nullable<Int32>)

Initializes a new instance of the TaskConstraints class.

Properties

MaxTaskRetryCount

Gets or sets the maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero.

MaxWallClockTime

Gets or sets the maximum elapsed time that the Task may run, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it.

RetentionTime

Gets or sets the minimum time to retain the Task directory on the Compute Node where it ran, from the time it completes execution. After this time, the Batch service may delete the Task directory and all its contents.

Applies to