---
title: "Update Schedule"
method: PUT
path: "/v1/update-schedule/{schedule_id}"
---

# Update Schedule

`PUT /v1/update-schedule/{schedule_id}`

## Path parameters

- `schedule_id` string, required

## Headers

- `X-API-Key` string, required

## Request body

- UpdateCronJobRequest
  - `timezone` string, nullable — IANA timezone the cron expression is read in. Null means UTC.
  - `schedule` union — The new schedule for the cron job.
    - EveryNMinutesSchedule
      - `window` ScheduleWindow — Restricts a recurring schedule to certain days and/or a daily time range — "Mondays and Fridays", "weekdays 9am-5pm". Times are read in the schedule's timezone.
        - `days` string[] — Days to run on; empty means every day
        - `start_time` string, nullable — HH:MM start of the daily window
        - `end_time` string, nullable — HH:MM end of the daily window
      - `frequency` 'every_n_minutes', required
      - `interval` integer, required — Repeat every N minutes (max 59)
    - EveryNHoursSchedule
      - `window` ScheduleWindow — Restricts a recurring schedule to certain days and/or a daily time range — "Mondays and Fridays", "weekdays 9am-5pm". Times are read in the schedule's timezone.
        - `days` string[] — Days to run on; empty means every day
        - `start_time` string, nullable — HH:MM start of the daily window
        - `end_time` string, nullable — HH:MM end of the daily window
      - `frequency` 'every_n_hours', required
      - `interval` integer, required — Repeat every N hours (max 23)
    - DailySchedule
      - `time` string, required — HH:MM 24hr time
      - `frequency` 'daily', required
      - `window` ScheduleWindow — Restricts a recurring schedule to certain days and/or a daily time range — "Mondays and Fridays", "weekdays 9am-5pm". Times are read in the schedule's timezone.
        - `days` string[] — Days to run on; empty means every day
        - `start_time` string, nullable — HH:MM start of the daily window
        - `end_time` string, nullable — HH:MM end of the daily window
    - WeeklySchedule
      - `time` string, required — HH:MM 24hr time
      - `frequency` 'weekly', required
      - `day_of_week` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday', required
    - MonthlySchedule
      - `time` string, required — HH:MM 24hr time
      - `frequency` 'monthly', required
      - `day_of_month` integer, required
    - CronSchedule
      - `frequency` 'cron', required
      - `expression` string, required — Cron expression
  - `enabled` boolean, nullable — Whether to enable or disable the cron job.

## Response `200`

Successful Response

- UpdateCronJobResponse
  - `id` string, required — The unique identifier for the updated cron job.
  - `simulation_id` string, required — The unique identifier for the associated simulation.
  - `cron_expression` string, required — The cron expression defining the job schedule.
  - `enabled` boolean, nullable — Whether the cron job is enabled.
  - `created_at` string, required — The timestamp when the cron job was created.
  - `timezone` string, nullable — IANA timezone the cron expression is read in. Null means UTC.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/getbluejay/apis/bluejay-api.md) · [All operations](https://skmtc.net/getbluejay/apis/bluejay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbluejay/bluejay-api/versions/f48cef80963f/schema)
