Commits
Click on a commit to change the comparison rangeAdd support for day_or parameter in cron schedule configurations
Fixes #19117
This PR adds support for the `day_or` parameter in cron schedule configurations
defined in `prefect.yaml` deployment files.
## Problem
When both `day_or` and `active` were defined in a deployment's cron schedule,
the deployment would fail with a validation error. The `day_or` field works
individually, but couldn't be used together with other schedule parameters.
## Root Cause
The `RawScheduleConfig` model in `src/prefect/cli/deploy/_models.py` had
`extra="forbid"` but was missing the `day_or` field, even though the underlying
`CronSchedule` class supports it. This caused any schedule config with `day_or`
to be rejected as invalid.
## Changes
1. Added `day_or` field to `RawScheduleConfig` model
2. Updated `_schedule_config_to_deployment_schedule` to extract and pass `day_or` to `CronSchedule`
3. Added comprehensive tests for `day_or` parameter handling
## Testing
- Added unit tests for `RawScheduleConfig` with `day_or`
- Added integration tests for full prefect.yaml validation
- Added tests for schedule conversion with `day_or`
- All existing tests pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>18 hours ago
by zzstoatzz