JobOperationsExtensions.Enable Method

Definition

Enables the specified Job, allowing new Tasks to run.

public static Microsoft.Azure.Batch.Protocol.Models.JobEnableHeaders Enable (this Microsoft.Azure.Batch.Protocol.IJobOperations operations, string jobId, Microsoft.Azure.Batch.Protocol.Models.JobEnableOptions jobEnableOptions = default);
static member Enable : Microsoft.Azure.Batch.Protocol.IJobOperations * string * Microsoft.Azure.Batch.Protocol.Models.JobEnableOptions -> Microsoft.Azure.Batch.Protocol.Models.JobEnableHeaders
<Extension()>
Public Function Enable (operations As IJobOperations, jobId As String, Optional jobEnableOptions As JobEnableOptions = Nothing) As 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

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