PATCH
/
api
/
deployments
/
{id}
/
schedules
/
{schedule_id}
This response does not have an example.

Headers

x-prefect-api-version
string

Path Parameters

id
string
required

The deployment id

schedule_id
string
required

The schedule id

Body

application/json

The updated schedule

active
boolean | null

Whether or not the schedule is active.

schedule
object | null

The schedule for the deployment. A schedule formed by adding interval increments to an anchor_date. If no anchor_date is supplied, the current UTC time is used. If a timezone-naive datetime is provided for anchor_date, it is assumed to be in the schedule's timezone (or UTC). Even if supplied with an IANA timezone, anchor dates are always stored as UTC offsets, so a timezone can be provided to determine localization behaviors like DST boundary handling. If none is provided it will be inferred from the anchor date.

NOTE: If the IntervalSchedule anchor_date or timezone is provided in a DST-observing timezone, then the schedule will adjust itself appropriately. Intervals greater than 24 hours will follow DST conventions, while intervals of less than 24 hours will follow UTC intervals. For example, an hourly schedule will fire every UTC hour, even across DST boundaries. When clocks are set back, this will result in two runs that appear to both be scheduled for 1am local time, even though they are an hour apart in UTC time. For longer intervals, like a daily schedule, the interval schedule will adjust for DST boundaries so that the clock-hour remains constant. This means that a daily schedule that always fires at 9am will observe DST and continue to fire at 9am in the local time zone.

Args: interval (datetime.timedelta): an interval to schedule on. anchor_date (DateTime, optional): an anchor date to schedule increments against; if not provided, the current timestamp will be used. timezone (str, optional): a valid timezone string.

max_scheduled_runs
integer | null

The maximum number of scheduled runs for the schedule.

Required range: x > 0
parameters
object

A dictionary of parameter value overrides.

slug
string | null

A unique identifier for the schedule.

Response

204

Successful Response