Share via


JobSchedule class

Class representing a JobSchedule.

Constructors

JobSchedule(BatchServiceClientContext)

Create a JobSchedule.

Methods

add(JobScheduleAddParameter, JobScheduleAddOptionalParams)
add(JobScheduleAddParameter, JobScheduleAddOptionalParams, ServiceCallback<void>)
add(JobScheduleAddParameter, ServiceCallback<void>)
deleteMethod(string, JobScheduleDeleteMethodOptionalParams)

When you delete a Job Schedule, this also deletes all Jobs and Tasks under that schedule. When Tasks are deleted, all the files in their working directories on the Compute Nodes are also deleted (the retention period is ignored). The Job Schedule statistics are no longer accessible once the Job Schedule is deleted, though they are still counted towards Account lifetime statistics.

deleteMethod(string, JobScheduleDeleteMethodOptionalParams, ServiceCallback<void>)
deleteMethod(string, ServiceCallback<void>)
disable(string, JobScheduleDisableOptionalParams)

No new Jobs will be created until the Job Schedule is enabled again.

disable(string, JobScheduleDisableOptionalParams, ServiceCallback<void>)
disable(string, ServiceCallback<void>)
enable(string, JobScheduleEnableOptionalParams)
enable(string, JobScheduleEnableOptionalParams, ServiceCallback<void>)
enable(string, ServiceCallback<void>)
exists(string, JobScheduleExistsOptionalParams)
exists(string, JobScheduleExistsOptionalParams, ServiceCallback<boolean>)
exists(string, ServiceCallback<boolean>)
get(string, JobScheduleGetOptionalParams)

Gets information about the specified Job Schedule.

get(string, JobScheduleGetOptionalParams, ServiceCallback<CloudJobSchedule>)
get(string, ServiceCallback<CloudJobSchedule>)
list(JobScheduleListOptionalParams)
list(JobScheduleListOptionalParams, ServiceCallback<CloudJobScheduleListResult>)
list(ServiceCallback<CloudJobScheduleListResult>)
listNext(string, JobScheduleListNextOptionalParams)
listNext(string, JobScheduleListNextOptionalParams, ServiceCallback<CloudJobScheduleListResult>)
listNext(string, ServiceCallback<CloudJobScheduleListResult>)
patch(string, JobSchedulePatchParameter, JobSchedulePatchOptionalParams)

This replaces only the Job Schedule properties specified in the request. For example, if the schedule property is not specified with this request, then the Batch service will keep the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.

patch(string, JobSchedulePatchParameter, JobSchedulePatchOptionalParams, ServiceCallback<void>)
patch(string, JobSchedulePatchParameter, ServiceCallback<void>)
terminate(string, JobScheduleTerminateOptionalParams)
terminate(string, JobScheduleTerminateOptionalParams, ServiceCallback<void>)
terminate(string, ServiceCallback<void>)
update(string, JobScheduleUpdateParameter, JobScheduleUpdateOptionalParams)

This fully replaces all the updatable properties of the Job Schedule. For example, if the schedule property is not specified with this request, then the Batch service will remove the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.

update(string, JobScheduleUpdateParameter, JobScheduleUpdateOptionalParams, ServiceCallback<void>)
update(string, JobScheduleUpdateParameter, ServiceCallback<void>)

Constructor Details

JobSchedule(BatchServiceClientContext)

Create a JobSchedule.

new JobSchedule(client: BatchServiceClientContext)

Parameters

client
BatchServiceClientContext

Reference to the service client.

Method Details

add(JobScheduleAddParameter, JobScheduleAddOptionalParams)

function add(cloudJobSchedule: JobScheduleAddParameter, options?: JobScheduleAddOptionalParams): Promise<JobScheduleAddResponse>

Parameters

cloudJobSchedule
JobScheduleAddParameter

The Job Schedule to be added.

options
JobScheduleAddOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleAddResponse>

add(JobScheduleAddParameter, JobScheduleAddOptionalParams, ServiceCallback<void>)

function add(cloudJobSchedule: JobScheduleAddParameter, options: JobScheduleAddOptionalParams, callback: ServiceCallback<void>)

Parameters

cloudJobSchedule
JobScheduleAddParameter

The Job Schedule to be added.

options
JobScheduleAddOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

add(JobScheduleAddParameter, ServiceCallback<void>)

function add(cloudJobSchedule: JobScheduleAddParameter, callback: ServiceCallback<void>)

Parameters

cloudJobSchedule
JobScheduleAddParameter

The Job Schedule to be added.

callback

ServiceCallback<void>

The callback

deleteMethod(string, JobScheduleDeleteMethodOptionalParams)

When you delete a Job Schedule, this also deletes all Jobs and Tasks under that schedule. When Tasks are deleted, all the files in their working directories on the Compute Nodes are also deleted (the retention period is ignored). The Job Schedule statistics are no longer accessible once the Job Schedule is deleted, though they are still counted towards Account lifetime statistics.

function deleteMethod(jobScheduleId: string, options?: JobScheduleDeleteMethodOptionalParams): Promise<JobScheduleDeleteResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule to delete.

options
JobScheduleDeleteMethodOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleDeleteResponse>

deleteMethod(string, JobScheduleDeleteMethodOptionalParams, ServiceCallback<void>)

function deleteMethod(jobScheduleId: string, options: JobScheduleDeleteMethodOptionalParams, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to delete.

options
JobScheduleDeleteMethodOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

deleteMethod(string, ServiceCallback<void>)

function deleteMethod(jobScheduleId: string, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to delete.

callback

ServiceCallback<void>

The callback

disable(string, JobScheduleDisableOptionalParams)

No new Jobs will be created until the Job Schedule is enabled again.

function disable(jobScheduleId: string, options?: JobScheduleDisableOptionalParams): Promise<JobScheduleDisableResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule to disable.

options
JobScheduleDisableOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleDisableResponse>

disable(string, JobScheduleDisableOptionalParams, ServiceCallback<void>)

function disable(jobScheduleId: string, options: JobScheduleDisableOptionalParams, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to disable.

options
JobScheduleDisableOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

disable(string, ServiceCallback<void>)

function disable(jobScheduleId: string, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to disable.

callback

ServiceCallback<void>

The callback

enable(string, JobScheduleEnableOptionalParams)

function enable(jobScheduleId: string, options?: JobScheduleEnableOptionalParams): Promise<JobScheduleEnableResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule to enable.

options
JobScheduleEnableOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleEnableResponse>

enable(string, JobScheduleEnableOptionalParams, ServiceCallback<void>)

function enable(jobScheduleId: string, options: JobScheduleEnableOptionalParams, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to enable.

options
JobScheduleEnableOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

enable(string, ServiceCallback<void>)

function enable(jobScheduleId: string, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to enable.

callback

ServiceCallback<void>

The callback

exists(string, JobScheduleExistsOptionalParams)

function exists(jobScheduleId: string, options?: JobScheduleExistsOptionalParams): Promise<JobScheduleExistsResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule which you want to check.

options
JobScheduleExistsOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleExistsResponse>

exists(string, JobScheduleExistsOptionalParams, ServiceCallback<boolean>)

function exists(jobScheduleId: string, options: JobScheduleExistsOptionalParams, callback: ServiceCallback<boolean>)

Parameters

jobScheduleId

string

The ID of the Job Schedule which you want to check.

options
JobScheduleExistsOptionalParams

The optional parameters

callback

ServiceCallback<boolean>

The callback

exists(string, ServiceCallback<boolean>)

function exists(jobScheduleId: string, callback: ServiceCallback<boolean>)

Parameters

jobScheduleId

string

The ID of the Job Schedule which you want to check.

callback

ServiceCallback<boolean>

The callback

get(string, JobScheduleGetOptionalParams)

Gets information about the specified Job Schedule.

function get(jobScheduleId: string, options?: JobScheduleGetOptionalParams): Promise<JobScheduleGetResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule to get.

options
JobScheduleGetOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleGetResponse>

get(string, JobScheduleGetOptionalParams, ServiceCallback<CloudJobSchedule>)

function get(jobScheduleId: string, options: JobScheduleGetOptionalParams, callback: ServiceCallback<CloudJobSchedule>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to get.

options
JobScheduleGetOptionalParams

The optional parameters

callback

ServiceCallback<CloudJobSchedule>

The callback

get(string, ServiceCallback<CloudJobSchedule>)

function get(jobScheduleId: string, callback: ServiceCallback<CloudJobSchedule>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to get.

callback

ServiceCallback<CloudJobSchedule>

The callback

list(JobScheduleListOptionalParams)

function list(options?: JobScheduleListOptionalParams): Promise<JobScheduleListResponse>

Parameters

options
JobScheduleListOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleListResponse>

list(JobScheduleListOptionalParams, ServiceCallback<CloudJobScheduleListResult>)

function list(options: JobScheduleListOptionalParams, callback: ServiceCallback<CloudJobScheduleListResult>)

Parameters

options
JobScheduleListOptionalParams

The optional parameters

list(ServiceCallback<CloudJobScheduleListResult>)

function list(callback: ServiceCallback<CloudJobScheduleListResult>)

Parameters

listNext(string, JobScheduleListNextOptionalParams)

function listNext(nextPageLink: string, options?: JobScheduleListNextOptionalParams): Promise<JobScheduleListResponse>

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
JobScheduleListNextOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleListResponse>

listNext(string, JobScheduleListNextOptionalParams, ServiceCallback<CloudJobScheduleListResult>)

function listNext(nextPageLink: string, options: JobScheduleListNextOptionalParams, callback: ServiceCallback<CloudJobScheduleListResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
JobScheduleListNextOptionalParams

The optional parameters

listNext(string, ServiceCallback<CloudJobScheduleListResult>)

function listNext(nextPageLink: string, callback: ServiceCallback<CloudJobScheduleListResult>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

patch(string, JobSchedulePatchParameter, JobSchedulePatchOptionalParams)

This replaces only the Job Schedule properties specified in the request. For example, if the schedule property is not specified with this request, then the Batch service will keep the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.

function patch(jobScheduleId: string, jobSchedulePatchParameter: JobSchedulePatchParameter, options?: JobSchedulePatchOptionalParams): Promise<JobSchedulePatchResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule to update.

jobSchedulePatchParameter
JobSchedulePatchParameter

The parameters for the request.

options
JobSchedulePatchOptionalParams

The optional parameters

Returns

Promise<Models.JobSchedulePatchResponse>

patch(string, JobSchedulePatchParameter, JobSchedulePatchOptionalParams, ServiceCallback<void>)

function patch(jobScheduleId: string, jobSchedulePatchParameter: JobSchedulePatchParameter, options: JobSchedulePatchOptionalParams, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to update.

jobSchedulePatchParameter
JobSchedulePatchParameter

The parameters for the request.

options
JobSchedulePatchOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

patch(string, JobSchedulePatchParameter, ServiceCallback<void>)

function patch(jobScheduleId: string, jobSchedulePatchParameter: JobSchedulePatchParameter, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to update.

jobSchedulePatchParameter
JobSchedulePatchParameter

The parameters for the request.

callback

ServiceCallback<void>

The callback

terminate(string, JobScheduleTerminateOptionalParams)

function terminate(jobScheduleId: string, options?: JobScheduleTerminateOptionalParams): Promise<JobScheduleTerminateResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule to terminates.

options
JobScheduleTerminateOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleTerminateResponse>

terminate(string, JobScheduleTerminateOptionalParams, ServiceCallback<void>)

function terminate(jobScheduleId: string, options: JobScheduleTerminateOptionalParams, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to terminates.

options
JobScheduleTerminateOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

terminate(string, ServiceCallback<void>)

function terminate(jobScheduleId: string, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to terminates.

callback

ServiceCallback<void>

The callback

update(string, JobScheduleUpdateParameter, JobScheduleUpdateOptionalParams)

This fully replaces all the updatable properties of the Job Schedule. For example, if the schedule property is not specified with this request, then the Batch service will remove the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.

function update(jobScheduleId: string, jobScheduleUpdateParameter: JobScheduleUpdateParameter, options?: JobScheduleUpdateOptionalParams): Promise<JobScheduleUpdateResponse>

Parameters

jobScheduleId

string

The ID of the Job Schedule to update.

jobScheduleUpdateParameter
JobScheduleUpdateParameter

The parameters for the request.

options
JobScheduleUpdateOptionalParams

The optional parameters

Returns

Promise<Models.JobScheduleUpdateResponse>

update(string, JobScheduleUpdateParameter, JobScheduleUpdateOptionalParams, ServiceCallback<void>)

function update(jobScheduleId: string, jobScheduleUpdateParameter: JobScheduleUpdateParameter, options: JobScheduleUpdateOptionalParams, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to update.

jobScheduleUpdateParameter
JobScheduleUpdateParameter

The parameters for the request.

options
JobScheduleUpdateOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

update(string, JobScheduleUpdateParameter, ServiceCallback<void>)

function update(jobScheduleId: string, jobScheduleUpdateParameter: JobScheduleUpdateParameter, callback: ServiceCallback<void>)

Parameters

jobScheduleId

string

The ID of the Job Schedule to update.

jobScheduleUpdateParameter
JobScheduleUpdateParameter

The parameters for the request.

callback

ServiceCallback<void>

The callback