你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
JobConstraints.MaxTaskRetryCount 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置每个任务可以重试的最大次数。 如果任务退出代码为非零,Batch 服务会重试任务。
[Newtonsoft.Json.JsonProperty(PropertyName="maxTaskRetryCount")]
public int? MaxTaskRetryCount { get; set; }
[<Newtonsoft.Json.JsonProperty(PropertyName="maxTaskRetryCount")>]
member this.MaxTaskRetryCount : Nullable<int> with get, set
Public Property MaxTaskRetryCount As Nullable(Of Integer)
属性值
- 属性
-
Newtonsoft.Json.JsonPropertyAttribute
注解
请注意,此值专门用于控制重试的次数。 Batch 服务将尝试每个任务一次,然后可能会重试到此限制。 例如,如果最大重试计数为 3,则 Batch 最多尝试一次 Task (4 次,) 重试 3 次。 如果最大重试计数为 0,则 Batch 服务不会重试任务。 如果最大重试计数为 -1,Batch 服务将无限制地重试任务,但不建议对启动任务或任何任务执行此操作。 默认值为 0 (不重试)