Hi. Is it possible to specify a schedule that runs...
# ask-community
p
Hi. Is it possible to specify a schedule that runs on the first Monday of each month?
k
I think you can do this with the community contributed RRuleSchedule at the bottom of the page here
It takes in an rrule object
p
Thanks, Kevin. I have a flow that needs to run the first Monday of every month and a daily flow that should run every day except for the first Monday. Can the RRule somehow be used to filter as well?
k
There is an RRuleClock that you can use if you want to combine multiple clocks
p
I ended up using a
rruleset
Copy code
# At 22:01 CST on Monday, Tuesday, Wednesday, and Thursday,
# except for the first Monday of each month. Times below are UTC.
rset = rruleset()
rset.rrule(rrule(DAILY, byweekday=(TU, WE, TH, FR), byhour=(4), byminute=(1)))
rset.exrule(rrule(MONTHLY, byweekday=(TU(1))))
schedule=RRuleSchedule(rrule_obj=rset)
k
Did it work for you?
p
it looks like it did. I need to spend more time looking at the dates to make sure.