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

TaskConstraints.MaxTaskRetryCount 属性

定义

获取或设置任务的最大重试次数。

public int? MaxTaskRetryCount { get; set; }
member this.MaxTaskRetryCount : Nullable<int> with get, set
Public Property MaxTaskRetryCount As Nullable(Of Integer)

属性值

注解

请注意,此值专门控制由于非零退出代码而导致任务可执行文件的重试次数。 批处理服务将尝试任务一次,然后重试,直至达到此上限为止。 例如,如果最大重试计数为 3,则 Batch (一次初始尝试最多尝试 4 次,) 重试 3 次。 如果最大重试计数为 0,则 Batch 服务不会在第一次尝试后重试任务。 如果最大重试计数为 -1,Batch 服务将无限制地重试任务。 只有在新的计算节点上重试任务时,才会再次下载资源文件和应用程序包。

适用于