Hello, Is it possible to implement something like ...
# ask-community
v
Hello, Is it possible to implement something like DateClock in Prefect 2? I was trying to implement custom Schedule, but getting validation error:
Copy code
pydantic.error_wrappers.ValidationError: 9 validation errors for Deployment
schedule -> interval
  field required (type=value_error.missing)
schedule -> calendar_id
  extra fields not permitted (type=value_error.extra)
schedule -> run_times
  extra fields not permitted (type=value_error.extra)
schedule -> cron
  field required (type=value_error.missing)
schedule -> calendar_id
  extra fields not permitted (type=value_error.extra)
schedule -> run_times
  extra fields not permitted (type=value_error.extra)
schedule -> rrule
  field required (type=value_error.missing)
schedule -> calendar_id
  extra fields not permitted (type=value_error.extra)
schedule -> run_times
  extra fields not permitted (type=value_error.extra)
c
Hi Vadym, there are a couple supported mechanisms: •
Cron
is most appropriate for users who are already familiar with
cron
from previous use. •
Interval
is best suited for deployments that need to run at some consistent cadence that isn’t related to absolute time. •
RRule
is best suited for deployments that rely on calendar logic for simple recurring schedules, irregular intervals, exclusions, or day-of-month adjustments. Do these not cover the scenario you are trying to achieve?
v
Hi @Christopher Boyd. We have custom custom calendar data that we use in Prefect V1 to pass set of datetimes. Didn't find something similar.
a
Using rrule you should be able to pass specific dates
v
Tried
Copy code
RDATE:20220920T200000Z,20220921T133000Z
but doesn't work, do not see scheduled flow runs
a
can you open a GitHub issue? could be some sort of bug or version issue