Share via


TaskAddParameter.CommandLine Property

Definition

Gets or sets the command line of the Task.

[Newtonsoft.Json.JsonProperty(PropertyName="commandLine")]
public string CommandLine { get; set; }
[<Newtonsoft.Json.JsonProperty(PropertyName="commandLine")>]
member this.CommandLine : string with get, set
Public Property CommandLine As String

Property Value

Attributes
Newtonsoft.Json.JsonPropertyAttribute

Remarks

For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/azure/batch/batch-compute-node-environment-variables).

Applies to