{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/saturnsql-com/json-schema/saturnsql-com-schedule-schema.json",
  "title": "Schedule",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/saturnsql-com-openapi.yaml#/components/schemas/Schedule",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "savedQueryId": {
      "type": "string"
    },
    "cronExpression": {
      "type": "string",
      "description": "5-field cron expression evaluated in `timezone`, e.g. '0 9 * * 1' for Monday 9am"
    },
    "timezone": {
      "type": "string",
      "description": "IANA timezone, e.g. America/New_York"
    },
    "startCell": {
      "type": "string",
      "description": "A1 notation anchor for the export"
    },
    "includeHeaders": {
      "type": "boolean"
    },
    "enabled": {
      "type": "boolean"
    },
    "nextRunAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastRunAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastError": {
      "type": [
        "string",
        "null"
      ]
    },
    "destinationType": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "sheets",
        "slack"
      ]
    },
    "spreadsheetId": {
      "type": [
        "string",
        "null"
      ]
    },
    "spreadsheetName": {
      "type": [
        "string",
        "null"
      ]
    },
    "sheetName": {
      "type": [
        "string",
        "null"
      ]
    },
    "slackChannelId": {
      "type": [
        "string",
        "null"
      ]
    },
    "slackChannelName": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}