Pedro Machado
11/13/2020, 2:49 AMPedro Machado
11/13/2020, 2:50 AMdef is_first_wednesday(dt):
first_wednesday = dt.start_of("month").next(pendulum.WEDNESDAY)
return dt == first_wednesday
clock = clocks.CronClock("0 0 * * 3")
schedule = Schedule(clocks=[clock], filters=[is_first_wednesday])
but I got
raise ValidationError("Invalid function reference: {}".format(value))
marshmallow.exceptions.ValidationError: Invalid function reference: <function is_first_wednesday at 0x7fa0e2768ee0>
Chris White
is_first_weekday_of_month(day_of_week: int)
could be a nice one to PR.
In the meantime, because your schedule description only consists of 12 dates that span the year, I recommend using an explicit list + a DatesClock
as described in this similar issue: https://github.com/PrefectHQ/prefect/issues/3501Pedro Machado
11/13/2020, 3:40 AM