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

TaskExecutionInformation.ExitCode 属性

定义

获取或设置 Task 命令行中指定的程序的退出代码。

[Newtonsoft.Json.JsonProperty(PropertyName="exitCode")]
public int? ExitCode { get; set; }
[<Newtonsoft.Json.JsonProperty(PropertyName="exitCode")>]
member this.ExitCode : Nullable<int> with get, set
Public Property ExitCode As Nullable(Of Integer)

属性值

属性
Newtonsoft.Json.JsonPropertyAttribute

注解

仅当 Task 处于已完成状态时,才会设置此属性。 通常,进程的退出代码反映了应用程序开发人员为该过程实现的特定约定。 如果使用退出代码值在代码中做出决策,请确保知道应用程序进程使用的退出代码约定。 但是,如果 Batch 服务因超时或用户通过 API 终止任务 () 你可能会看到操作系统定义的退出代码。

适用于