On this page
The SHOW SCHEDULES
statement lists all of the currently active backup schedules and changefeed schedules.
It also lists all of the currently active scheduled jobs for Row-Level TTL.
Required privileges
The following users can show a schedule:
- Members of the
admin
role. By default, theroot
user belongs to theadmin
role. - Owners of a backup schedule, i.e., the user that created the backup schedule.
- Owners of a changefeed schedule, i.e., the user that created the changefeed schedule.
Synopsis
Parameters
Parameter | Description |
---|---|
schedule_id |
The ID of the schedule you want to view. |
Response
The output of SHOW 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., pause, resume, or drop 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 TIMESTAMP 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 jobs currently running for the schedule. |
owner |
The user who created the schedule. Users with active schedules cannot be dropped. |
created |
The TIMESTAMP when the job was created. |
on_previous_running |
The status of the scheduled job if the previous backup is still running. This option by default is set to WAIT . |
on_execution_failure |
The status of the scheduled job if an error occurs during the job execution. This option by default is set to RETRY_SCHED . |
command |
The command that the scheduled job will run. This can be derived from the CREATE SCHEDULE FOR BACKUP statement, CREATE SCHEDULE FOR CHANGEFEED statement, or generated by the system for Row-Level TTL jobs. |
backup_type |
Displays whether a scheduled backup job is FULL or INCREMENTAL 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)
To view the CREATE SCHEDULE
statements for scheduled jobs, use SHOW CREATE SCHEDULE
.
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's id
:
> 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)