你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

JobManagerTask.CommandLine 属性

定义

获取或设置作业管理器任务的命令行。

[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

属性值

属性
Newtonsoft.Json.JsonPropertyAttribute

注解

命令行不在 shell 下运行,因此无法利用 shell 功能,例如环境变量扩展。 如果要利用此类功能,则应在命令行中调用 shell,例如在 Windows 中使用“cmd /c MyCommand”或 Linux 中的“/bin/sh -c MyCommand”。 如果命令行引用文件路径,则应使用相对于 Task 工作目录) 的相对路径 (,或使用 Batch 提供的环境变量 (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).

适用于