Share via


StartTask Class

Definition

A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged.

public class StartTask
type StartTask = class
Public Class StartTask
Inheritance
StartTask

Remarks

In some cases the start task may be re-run even though the node was not rebooted. Due to this, start tasks should be idempotent and exit gracefully if the setup they're performing has already been done. Special care should be taken to avoid start tasks which create breakaway process or install/launch services from the start task working directory, as this will block Batch from being able to re-run the start task.

Constructors

StartTask()

Initializes a new instance of the StartTask class.

StartTask(String, IList<ResourceFile>, IList<EnvironmentSetting>, UserIdentity, Nullable<Int32>, Nullable<Boolean>, TaskContainerSettings)

Initializes a new instance of the StartTask class.

Properties

CommandLine

Gets or sets the command line of the start task.

ContainerSettings

Gets or sets the settings for the container under which the start task runs.

EnvironmentSettings

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

MaxTaskRetryCount

Gets or sets the maximum number of times the task may be retried.

ResourceFiles

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

UserIdentity

Gets or sets the user identity under which the start task runs.

WaitForSuccess

Gets or sets whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node.

Methods

Validate()

Validate the object.

Applies to