---
title: "Change a crawl schedule"
method: PATCH
path: "/v1/sites/{site}/schedules/{schedule_id}"
tags: ["schedules"]
---

# Change a crawl schedule

`PATCH /v1/sites/{site}/schedules/{schedule_id}`

## Request

- Base URL: `https://frontshelf.io/api`
- URL: `https://frontshelf.io/api/v1/sites/{site}/schedules/{schedule_id}`
- Auth: HTTP bearer

Change one schedule of a site: any of its fields; what you leave out stays. `enabled: false` pauses it, `max_pages: null` returns it to the site's own budget. A new `cron`, or enabling it, sets its next run to the next slot from now. An agent may schedule at most 5 crawls a day for a site, every enabled schedule counted over the next 24 hours: a write past it is VALIDATION_FAILED; choose a slower schedule, or ask your human to set it in Frontshelf. It changes what crawls do, so it asks for confirmation: call it with dry_run: true to see the change, then with confirm: true. Your human sees it in the site's settings and can change it back there. A schedule that is not this site's is NOT_FOUND.

## Path parameters

- `site` string, required: Site ID (site_…), origin (https://example.com), or bare domain, resolved server-side; the response carries the canonical ID.
- `schedule_id` string, required: The schedule's id (st_…), as schedules_list gives it.

## Request body

- object
  - `name` string: A name for the schedule, up to 80 characters.
  - `cron` string: When it runs: a 5-field cron expression in UTC (`0 3 * * 1` is Mondays at 03:00 UTC). A run that is missed is skipped, never caught up.
  - `max_pages` integer, nullable: The page budget of its crawls; null: the site's own budget.
  - `enabled` boolean: False keeps the schedule without running it.
  - `auto_compare` boolean: Compare each crawl with the one before when it lands.
  - `export_reports` string[]: Replaces the list whole.
  - `email_on_complete` boolean: Email the team when each crawl lands.
  - `dry_run` boolean: true: check the call and say what it would do, without doing it.
  - `confirm` boolean: true: go ahead with a change that asks for confirmation.

## Response `200`

Change a crawl schedule

- object
  - `summary` string, required: The answer in one or two sentences, with the numbers it rests on.
  - `warnings` string[], required: What limits this answer (a cap, a read that was cut short). Empty when nothing does.
  - `next_actions` object[], required: What to call next, best first. Follow them.
    - `capability` string, required: What to call next: a capability.
    - `arguments` object, required: Its arguments, complete; pass them as they are.
    - `instruction` string, required: What to do, written to you.
  - `site_id` string, required: The site's canonical id.
  - `schedule` object, required
    - `id` string, required: The schedule's id (st_…): schedules_update and schedules_delete take it.
    - `site_id` string, required
    - `name` string, required
    - `enabled` boolean, required: False: the schedule is kept and never runs.
    - `cron` string, required: When it runs: a 5-field cron expression, in UTC.
    - `max_pages` integer, nullable, required: The page budget of its crawls; null: the site's own budget.
    - `auto_compare` boolean, required: Whether each crawl is compared with the one before when it lands.
    - `export_reports` string[], required: Reports exported after each accepted crawl, by report id (`pdf` is the PDF report).
    - `email_on_complete` boolean, required: Whether the team is emailed when each crawl lands.
    - `next_run_at` string, nullable, required: When it runs next (ISO 8601); null while disabled.
    - `last_run_at` string, nullable, required
    - `last_crawl_id` string, nullable, required: The crawl it last started (crawls_get reads it); null before its first run.
    - `created_at` string, required
    - `updated_at` string, required

## Other responses

- `400`: VALIDATION_FAILED
- `401`: UNAUTHENTICATED
- `402`: BILLING_REQUIRED
- `403`: ORGANIZATION_FROZEN, SCOPE_DENIED
- `404`: SITE_NOT_FOUND, NOT_FOUND
- `409`: AMBIGUOUS_SITE, AGENT_STOPPED
- `428`: CONFIRMATION_REQUIRED
- `503`: PLATFORM_READ_ONLY, DEPENDENCY_UNAVAILABLE

---

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