Matt Liu
08/11/2026, 12:43 AMMarvin
08/11/2026, 12:44 AMMarvin
08/11/2026, 12:45 AMend_date on a CronSchedule.
In Prefect 2.15, cron schedules support:
- cron
- timezone
- day_or
They do not include an end_date field.
If you need a schedule that stops after a certain date, use an RRule schedule instead, with UNTIL in the recurrence rule.
Example:
python
from prefect.client.schemas.schedules import RRuleSchedule
schedule = RRuleSchedule(
rrule="FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR;UNTIL=20240730T040000Z",
timezone="America/New_York",
)
Relevant references:
- Prefect 2.15 CronSchedule schema: CronSchedule source
- Prefect 2.15 RRuleSchedule schema: RRuleSchedule source
- Scheduling docs: Prefect schedules docs
If you want, I can also help translate your cron expression into an equivalent RRuleSchedule.