Nicholas Chammas
08/09/2021, 7:51 PMschedule = Schedule(
clocks=[IntervalClock(interval=timedelta(days=1)),],
or_filters=[
between_dates(start_month=1, start_day=1, end_month=1, end_day=1),
between_dates(start_month=4, start_day=1, end_month=4, end_day=1),
between_dates(start_month=7, start_day=1, end_month=7, end_day=1),
between_dates(start_month=10, start_day=1, end_month=10, end_day=1),
],
)
Is that idiomatic Prefect? Or is there a more natural way of doing this?
Another potential solution is to use IntervalClock
with an interval of 3 months, except you can’t say timedelta(months=3)
and get the interval to fire on the first of the month easily.Kevin Kho
on_datetime
instead to allow on that specific day?Kevin Kho
CronClock
too. Something like 0 0 1 */3 *
Nicholas Chammas
08/09/2021, 7:58 PMschedule = Schedule(
clocks=[IntervalClock(interval=timedelta(days=1))],
or_filters=[
on_date(month=1, day=1),
on_date(month=4, day=1),
on_date(month=7, day=1),
on_date(month=10, day=1),
],
)
Nicholas Chammas
08/09/2021, 7:58 PM