JobOperationsExtensions.EnableAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enables the specified Job, allowing new Tasks to run.
public static System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.JobEnableHeaders> EnableAsync (this Microsoft.Azure.Batch.Protocol.IJobOperations operations, string jobId, Microsoft.Azure.Batch.Protocol.Models.JobEnableOptions jobEnableOptions = default, System.Threading.CancellationToken cancellationToken = default);
static member EnableAsync : Microsoft.Azure.Batch.Protocol.IJobOperations * string * Microsoft.Azure.Batch.Protocol.Models.JobEnableOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.JobEnableHeaders>
<Extension()>
Public Function EnableAsync (operations As IJobOperations, jobId As String, Optional jobEnableOptions As JobEnableOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of JobEnableHeaders)
Parameters
- operations
- IJobOperations
The operations group for this extension method.
- jobId
- String
The ID of the Job to enable.
- jobEnableOptions
- JobEnableOptions
Additional parameters for the operation
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Remarks
When you call this API, the Batch service sets a disabled Job to the enabling state. After the this operation is completed, the Job moves to the active state, and scheduling of new Tasks under the Job resumes. The Batch service does not allow a Task to remain in the active state for more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more than 180 days ago, those Tasks will not run.
Applies to
Azure SDK for .NET