---
title: "Get a schedule"
method: GET
path: "/schedules/{id}"
tags: ["Schedules"]
---

# Get a schedule

`GET /schedules/{id}`

## Request

- Base URL: `https://saturnsql.com/api`
- URL: `https://saturnsql.com/api/schedules/{id}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns a single schedule by id, with its 10 most recent run logs. Requires a session token.

## Path parameters

- `id` string, cuid, required

## Response `200`

Schedule

- Schedule
  - `id` string
  - `savedQueryId` string
  - `cronExpression` string: 5-field cron expression evaluated in `timezone`, e.g. '0 9 * * 1' for Monday 9am
  - `timezone` string: IANA timezone, e.g. America/New_York
  - `startCell` string: A1 notation anchor for the export
  - `includeHeaders` boolean
  - `enabled` boolean
  - `nextRunAt` string, date-time, nullable
  - `lastRunAt` string, date-time, nullable
  - `lastError` string, nullable
  - `destinationType` 'sheets' | 'slack', nullable
  - `spreadsheetId` string, nullable
  - `spreadsheetName` string, nullable
  - `sheetName` string, nullable
  - `slackChannelId` string, nullable
  - `slackChannelName` string, nullable

## Other responses

- `401`: Bad or missing credentials
- `404`: Schedule not found

---

[API](https://skmtc.dev/saturnsql/apis/saturnsql-api.md) · [All operations](https://skmtc.dev/saturnsql/apis/saturnsql-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saturnsql/apis/saturnsql-api/revisions/90a3e54ad115?raw)
