Share via


CloudTask Class

Definition

An Azure Batch Task.

public class CloudTask
type CloudTask = class
Public Class CloudTask
Inheritance
CloudTask

Remarks

Batch will retry Tasks when a recovery operation is triggered on a Node. Examples of recovery operations include (but are not limited to) when an unhealthy Node is rebooted or a Compute Node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all Tasks should be idempotent. This means Tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The best practice for long running Tasks is to use some form of checkpointing.

Constructors

CloudTask()

Initializes a new instance of the CloudTask class.

CloudTask(String, String, String, String, Nullable<DateTime>, Nullable<DateTime>, ExitConditions, Nullable<TaskState>, Nullable<DateTime>, Nullable<TaskState>, Nullable<DateTime>, String, TaskContainerSettings, IList<ResourceFile>, IList<OutputFile>, IList<EnvironmentSetting>, AffinityInformation, TaskConstraints, Nullable<Int32>, UserIdentity, TaskExecutionInformation, ComputeNodeInformation, MultiInstanceSettings, TaskStatistics, TaskDependencies, IList<ApplicationPackageReference>, AuthenticationTokenSettings)

Initializes a new instance of the CloudTask class.

Properties

AffinityInfo

Gets or sets a locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task.

ApplicationPackageReferences

Gets or sets a list of Packages that the Batch service will deploy to the Compute Node before running the command line.

AuthenticationTokenSettings

Gets or sets the settings for an authentication token that the Task can use to perform Batch service operations.

CommandLine

Gets or sets the command line of the Task.

Constraints

Gets or sets the execution constraints that apply to this Task.

ContainerSettings

Gets or sets the settings for the container under which the Task runs.

CreationTime

Gets or sets the creation time of the Task.

DependsOn

Gets or sets the Tasks that this Task depends on.

DisplayName

Gets or sets a display name for the Task.

EnvironmentSettings

Gets or sets a list of environment variable settings for the Task.

ETag

Gets or sets the ETag of the Task.

ExecutionInfo

Gets or sets information about the execution of the Task.

ExitConditions

Gets or sets how the Batch service should respond when the Task completes.

Id

Gets or sets a string that uniquely identifies the Task within the Job.

LastModified

Gets or sets the last modified time of the Task.

MultiInstanceSettings

Gets or sets an object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task.

NodeInfo

Gets or sets information about the Compute Node on which the Task ran.

OutputFiles

Gets or sets a list of files that the Batch service will upload from the Compute Node after running the command line.

PreviousState

Gets or sets the previous state of the Task.

PreviousStateTransitionTime

Gets or sets the time at which the Task entered its previous state.

RequiredSlots

Gets or sets the number of scheduling slots that the Task requires to run.

ResourceFiles

Gets or sets a list of files that the Batch service will download to the Compute Node before running the command line.

State

Gets or sets the current state of the Task.

StateTransitionTime

Gets or sets the time at which the Task entered its current state.

Stats

Gets or sets resource usage statistics for the Task.

Url

Gets or sets the URL of the Task.

UserIdentity

Gets or sets the user identity under which the Task runs.

Applies to