Suspend, Resume or Kill a Schedule on Microsoft Azure
- PUT /api/v1.2/scheduler/(int: id)
Use this API to suspend, resume, or kill a schedule.
Note
After you stop a schedule, you cannot resume it. However, you can suspend a schedule and resume it later.
Required Role
The following users can make this API call:
- Users who belong to the system-admin group. 
- Users who belong to a group associated with a role that allows suspending, resuming, or killing a schedule. See Managing Groups and Managing Roles for more information. 
This API is used to suspend, resume, or kill an existing schedule created to run commands automatically at certain frequency in a specified interval.
| Resource URI | scheduler/id | 
| Request Type | PUT | 
| Supporting Versions | v1.2 | 
| Return Value | JSON object with the status of the operation. | 
Parameters
Note
Parameters marked in bold below are mandatory. Others are optional and have default values.
| Parameter | Description | 
|---|---|
| status | It indicates the status and its valid values are  | 
| no_catch_up | Note You can use this parameter while resuming a suspended schedule. Set this parameter to  | 
Examples
Example to Suspend a Schedule
curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Accept: application/json" -H "Content-type: application/json" \
-d '{"status":"suspend"}' \ "https://api.qubole.com/api/v1.2}/scheduler/${SCHEDID}/"
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.
Response
{"succeeded":"true","status":"SUSPENDED"}
Note
There is a rerun limit for a scheduled job. qds-scheduler-concepts provides more information.
Example to Resume a Suspended Schedule
Note
A _SUCCESS file is created in the output folder for successful schedules. You can set
mapreduce.fileoutputcommitter.marksuccessfuljobs to false to disable creation of _SUCCESS file
or to true to enable creation of the _SUCCESS file.
curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Accept: application/json" -H "Content-type: application/json" \
-d '{"status":"resume"}' \ "https://api.qubole.com/api/v1.2/scheduler/${SCHEDID}/"
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.
Response
{"succeeded":"true","status":"RUNNING"}
Note
After you stop a schedule, you cannot resume it. However, you can suspend a schedule and resume it later.
Example to Kill a Schedule
curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Accept: application/json" -H "Content-type: application/json" \
-d '{"status":"kill"}' \ "https://api.qubole.com/api/v1.2/scheduler/${SCHEDID}/"
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.
Response
{"succeeded":"true","status":"KILLED"}