Use Cases
- AI Agents: Let an agent keep the queries and dashboards it builds fresh, without a manual step in the app.
- Fresh Results for Apps: Run a query on a schedule, then read its latest result with Get Latest Query Result.
- Bulk Changes: Move many schedules to a lower frequency or a smaller performance tier in one script.
- Cleanup: Find and delete schedules you no longer need, to stop their credit use.
Behavior
- A query or a dashboard has at most one schedule. You address it by the query ID or the dashboard ID.
PUTcreates the schedule, or replaces all the settings of the one that exists. Send every setting you want to keep. An omittedexpires_atmeans no expiry date.- Every scheduled run costs credits at the chosen performance tier:
small,medium, orlarge. The tier must be available to the API on the owner’s plan. - The schedule belongs to the owner of the query or dashboard. You must own it, or be an editor or admin of the team that owns it. A team API key can only change its own team’s content.
- The owner’s plan limits how many schedules it can have. When that limit is reached,
PUTreturns402. - On the free plan, a schedule expires after at most 3 months. A later or omitted
expires_atis set to that limit. - Materialized view refreshes are listed, but you change them with the Materialized Views API.
Cron Expressions
Schedules use 5-part cron expressions in UTC. Only these forms are supported:
M is
0 or 30, and H is 0 to 23. Other expressions return 400.
List Schedules
List the query, dashboard, and materialized view schedules you can see.
Set Query Schedule
Run a saved query on a schedule, or change its schedule.
Delete Query Schedule
Stop running a saved query on a schedule.
Set Dashboard Schedule
Refresh a dashboard on a schedule, or change its schedule.
Delete Dashboard Schedule
Stop refreshing a dashboard on a schedule.