Clone a Schedule

POST /api/v1.2/scheduler/(SchedulerID)/duplicate

Use this API to clone an existing schedule by providing a new schedule name.

Required Role

The following users can make this API call:

  • Users who belong to the system-user or system-admin group.

  • Users who belong to a group associated with a role that allows cloning a schedule. See Managing Groups and Managing Roles for more information.



Parameters marked in bold below are mandatory. Others are optional and have default values.




A valid command type supported by Qubole. For example, HiveCommand, HadoopCommand, PigCommand.


JSON object describing the command. Refer to the Command API for more details.

Sub fields can use macros. Refer to the Qubole Scheduler for more details.


Start datetime for the schedule


End datetime for the schedule


Set this option or cron_expression but do not set both options. Specify how often the schedule should run. Input is an integer. For example, frequency of one hour/day/month is represented as {"frequency":"1"}


Denotes the time unit for the frequency. Its default value is days. Accepted value is minutes, hours, days, weeks, or months.


Set this option or frequency but do not set both options. The standard cron format is “s, m, h, d, M, D, Y” where s is second, m is minute, M is month, d is date, and D is day of the week. Only year (Y) is optional. Example - "cron_expression":"0 0 12 * * ?". For more information, see Cron Trigger Tutorial.


A user-defined name for a schedule. If name is not specified, then a system-generated Schedule ID is set as the name. While cloning an existing schedule, you must change the name.


Specify a cluster label that identifies the cluster on which the schedule API call must be run.


Expressions to evaluate macros. Macros can be used in parameterized commands.

Refer to the Macros in Scheduler page for more details.


Set this parameter to true if you want to skip schedule actions that were supposed to have run in the past and run only the api/v1.2 schedule actions. By default, this parameter is set to false. When a new schedule is created, the scheduler runs schedule actions from start time to the current time. For example, if a daily schedule is created from Jun 1, 2015 on Dec 1, 2015, schedules are run for Jun 1, 2015, Jun 2, 2015, and so on. If you do not want the scheduler to run the missed schedule actions for months earlier to Dec, set no_catch_up to true. The main use of skipping a schedule action is if when you suspend a schedule and resume it later, in which case, there will be more than one schedule action and you might want to skip the earlier schedule actions. For more information, see Understanding the Qubole Scheduler Concepts.


Timezone of the start and end time of the schedule.

Scheduler will understand ZoneInfo identifiers. For example, Asia/Kolkata.

For a list of identifiers, check column 3 in List of TZ in databases.

Default value is UTC.


You can set the command timeout configurable in seconds. Its default value is 129600 seconds (36 hours) and any other value that you set must be less than 36 hours. QDS checks the timeout for a command every 60 seconds. If the timeout is set for 80 seconds, the command gets killed in the next minute that is after 120 seconds. By setting this parameter, you can avoid the command from running for 36 hours.


Unit is minutes. A number that represents a maximum amount of time the schedule should wait for dependencies to be satisfied.


Specify how many scheudle actions can run at a time. Default value is 1.


Describe dependencies for this schedule.

Check the Hive Datasets as Schedule Dependency for more information.


It is an optional parameter that is set to false by default. You can set it to true if you want to be notified through email about instance failure. notification provides more information.





It is a notification email type that is set to true if a schedule periodicity is in minutes or hours. If it set to false, the email type is immediate by default.


If this option is set to true, you receive schedule failure notifications.


If this option is set to true, you receive schedule success notifications.


By default, the current user’s email ID is added. You can add additional email IDs as required.





Use this parameter if there is dependency on S3 files and it has the following sub options. For more information, see Configuring S3/Azure Blob Storage Files Data Dependency.


It is the S3 path of the dependent file (with data) based on which the schedule runs.


It denotes the start day or time.


It denotes the end day or time.


Use this parameter if there is dependency on Hive table data that has partitions. For more information, see Configuring Hive Tables Data Dependency.


It is the database that contains the partitioned Hive table.


It is the name of the partitioned Hive table.


It denotes the start day or time.


It denotes the end day or time.


It denotes the dataset interval and defines how often the data is generated. Hive Datasets as Schedule Dependency provides more information. You must also specify the incremental time that can be in minutes, hours, days, weeks, or months. The usage is "interval":{"days":"1"}. The default interval is 1 day.


It denotes the partitioned column name. You must specify the date-time mask through the_date parameter denotes how to convert from date to string for the partition. The usage is "columns":{"the_date":"<value>"}. The <value> can be a macro or a string.


The response contains a JSON object representing the cloned schedule.


There is a rerun limit for schedule reruns to be processed concurrently at a given point of time. Understanding the Qubole Scheduler Concepts provides more information.


Goal: Clone an existing schedule, for example: schedule ID 3159, to create a new schedule. For more information on how to create a schedule, see Create a Schedule.

While creating a schedule, we created a schedule that aggregates data every day, for every stock symbol, and for each stock exchange. For example, if you want to edit the query to also calculate the total transaction amount for the stock in a day, provide the following query.

  "command": {
    "query": "select stock_symbol, stock_exchange, max(high), min(low), sum(volume) from daily_tick_data where date1='$formatted_date$' group by stock_symbol, stock_exchange"
  "start_time": "2012-11-01T02:00Z",
  "end_time": "2022-10-01T02:00Z"


curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Accept: application/json" -H "Content-type: application/json" \
-d '{ "name": "schedule1" }' \


The above syntax uses as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.

Sample Response

 "start_time":"2012-07-01 02:00",
            "sample":false,"loader_table_name":null,"md_cmd":null,"script_location":null,"approx_mode":false,"query":"select stock_symbol, max(high), min(low), sum(volume) from daily_tick_data where date1='$formatted_date$' group by stock_symbol","loader_stable":null,"approx_aggregations":false
 "end_time":"2022-07-01 02:00",