SHOW SCHEDULES lists all of the currently active and .
It also lists all of the currently active scheduled jobs for .
Required privileges
The following users can show a schedule:- Members of the . By default, the
rootuser belongs to theadminrole. - Owners of a backup schedule, i.e., the user that .
- Owners of a changefeed schedule, i.e., the user that .
Synopsis
Parameters
| Parameter | Description |
|---|---|
schedule\_id | The ID of the schedule you want to view. |
Response
The output ofSHOW SCHEDULES is sorted by creation time. The following fields are returned for each schedule:
| Field | Description |
|---|---|
id | A unique ID to identify each schedule. This value is used if you want to control schedules (i.e., , , or it). |
label | The name used to identify the schedule, given at the time of schedule creation. |
schedule\_status | The schedule’s current status. |
next\_run | The at which the next scheduled job is slated to run. |
state | Displays last-known errors or messages about the schedule. Cleared on retry of a scheduled job. |
recurrence | How often the scheduled job is run, which is set at the time of schedule creation. |
jobsrunning | The number of currently running for the schedule. |
owner | The who created the schedule. Users with active schedules cannot be dropped. |
created | The when the job was created. |
on\_previous\_running | The status of the scheduled job if the previous backup is still running. This by default is set to WAIT. |
on\_execution\_failure | The status of the scheduled job if an error occurs during the job execution. This by default is set to RETRY\_SCHED. |
command | The command that the scheduled job will run. This can be derived from the statement, statement, or generated by the system for jobs. |
backup\_type | Displays whether a scheduled backup job is or when running SHOW SCHEDULES FOR BACKUP. |
Examples
Show schedules
> SHOW SCHEDULES;
id | label | schedule_status | next_run | state | recurrence | jobsrunning | owner | created | on_previous_running | on_execution_failure | command
---------------------+---------------------+-----------------+---------------------------+----------------------------------------+------------+-------------+-------+----------------------------------+---------------------+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
588796190000218113 | schedule_name | ACTIVE | 2020-09-15 00:00:00+00:00 | NULL | @daily | 0 | root | 2020-09-10 16:52:16.846944+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP INTO LATEST IN 's3://test/schedule-test2?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached", "backup_type": 1}
588819866656997377 | schedule_database | ACTIVE | 2020-09-15 00:01:00+00:00 | NULL | 1 0 * * * | 0 | root | 2020-09-10 18:52:42.339026+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP DATABASE movr INTO LATEST IN 's3://test/schedule-database?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached", "backup_type": 1}
588820615348027393 | schedule_database | ACTIVE | 2020-09-14 22:00:00+00:00 | NULL | @hourly | 0 | root | 2020-09-10 18:56:30.919388+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP TABLE movr.vehicles INTO LATEST IN 's3://test/schedule-table?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached", "backup_type": 1}
589963390457741313 | scheduled_first_run | PAUSED | NULL | Waiting for initial backup to complete | @hourly | 0 | root | 2020-09-14 19:48:58.042612+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP TABLE movr.vehicles INTO LATEST IN 's3://test/scheduled-first-run?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached", "backup_type": 1}
588796190012702721 | schedule_name | ACTIVE | 2020-09-20 00:00:00+00:00 | NULL | @weekly | 0 | root | 2020-09-10 16:52:16.846944+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP INTO 's3://test/schedule-test2?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached"}
588819866674233345 | schedule_database | ACTIVE | 2020-09-20 00:00:00+00:00 | NULL | @weekly | 0 | root | 2020-09-10 18:52:42.339026+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP DATABASE movr INTO 's3://test/schedule-database?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached"}
588820615382302721 | schedule_database | ACTIVE | 2020-09-15 00:00:00+00:00 | NULL | @daily | 0 | root | 2020-09-10 18:56:30.919388+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP TABLE movr.vehicles INTO 's3://test/schedule-table?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached"}
589963390487363585 | scheduled_first_run | ACTIVE | 2020-09-15 00:00:00+00:00 | NULL | @daily | 0 | root | 2020-09-14 19:48:58.042612+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP TABLE movr.vehicles INTO 's3://test/scheduled-first-run?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached", "unpause_on_success": 589963390457741313}
(8 rows)
CREATE SCHEDULE statements for scheduled jobs, use .
Show running schedules
> SHOW RUNNING SCHEDULES;
id | label | schedule_status | next_run | state | recurrence | jobsrunning | owner | created | on_previous_running | on_execution_failure | command
---------------------+---------------------+-----------------+---------------------------+----------------------------------------+------------+-------------+-------+----------------------------------+---------------------+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
588796190000218113 | schedule_name | ACTIVE | 2020-09-15 00:00:00+00:00 | NULL | @daily | 0 | root | 2020-09-10 16:52:16.846944+00:00 | WAIT | RETRY_SCHED | BACKUP INTO LATEST IN 's3://test/schedule-test2?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached
588819866656997377 | schedule_database | ACTIVE | 2020-09-15 00:01:00+00:00 | NULL | 1 0 * * * | 0 | root | 2020-09-10 18:52:42.339026+00:00 | WAIT | RETRY_SCHED | BACKUP DATABASE movr INTO LATEST IN 's3://test/schedule-database?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached
588820615348027393 | schedule_database | ACTIVE | 2020-09-14 22:00:00+00:00 | NULL | @hourly | 0 | root | 2020-09-10 18:56:30.919388+00:00 | WAIT | RETRY_SCHED | BACKUP TABLE movr.vehicles INTO LATEST IN 's3://test/schedule-table?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached
588796190012702721 | schedule_name | ACTIVE | 2020-09-20 00:00:00+00:00 | NULL | @weekly | 0 | root | 2020-09-10 16:52:16.846944+00:00 | WAIT | RETRY_SCHED | BACKUP INTO 's3://test/schedule-test2?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached
588819866674233345 | schedule_database | ACTIVE | 2020-09-20 00:00:00+00:00 | NULL | @weekly | 0 | root | 2020-09-10 18:52:42.339026+00:00 | WAIT | RETRY_SCHED | BACKUP DATABASE movr INTO 's3://test/schedule-database?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached
588820615382302721 | schedule_database | ACTIVE | 2020-09-15 00:00:00+00:00 | NULL | @daily | 0 | root | 2020-09-10 18:56:30.919388+00:00 | WAIT | RETRY_SCHED | BACKUP TABLE movr.vehicles INTO 's3://test/schedule-table?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached
589963390487363585 | scheduled_first_run | ACTIVE | 2020-09-15 00:00:00+00:00 | NULL | @daily | 0 | root | 2020-09-14 19:48:58.042612+00:00 | WAIT | RETRY_SCHED | BACKUP TABLE movr.vehicles INTO 's3://test/scheduled-first-run?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached
(7 rows)
Show paused schedules
> SHOW PAUSED SCHEDULES;
id | label | schedule_status | next_run | state | recurrence | jobsrunning | owner | created | on_previous_running | on_execution_failure | command
---------------------+---------------------+-----------------+----------+----------------------------------------+------------+-------------+-------+----------------------------------+---------------------+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
589963390457741313 | scheduled_first_run | PAUSED | NULL | Waiting for initial backup to complete | @hourly | 0 | root | 2020-09-14 19:48:58.042612+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP TABLE movr.vehicles INTO LATEST IN 's3://test/scheduled-first-run?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached", "backup_type": 1}
(1 row)
Show a specific schedule
To view a specific schedule, use the schedule’sid:
> SHOW SCHEDULE 588796190012702721;
id | label | schedule_status | next_run | state | recurrence | jobsrunning | owner | created | on_previous_running | on_execution_failure | command
---------------------+---------------------+-----------------+---------------------------+----------------------------------------+------------+-------------+-------+----------------------------------+---------------------+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
588796190012702721 | schedule_name | ACTIVE | 2020-09-20 00:00:00+00:00 | NULL | @weekly | 0 | root | 2020-09-10 16:52:16.846944+00:00 | WAIT | RETRY_SCHED | {"backup_statement": "BACKUP INTO 's3://test/schedule-test2?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=redacted' WITH revision_history, detached"}
(1 row)

