https://prefect.io logo
#prefect-community
Title
# prefect-community
m

Matthew Seligson

04/13/2022, 2:07 PM
What’s the best way (in Prefect 1.0) to schedule a flow to run at 8am US/Eastern on the second weekday of the month? It seems that CronClocks will handle DST well but can’t handle weekday of the month. And RRule clocks can handle this well but it’s not obvious to me how good their DST handling is. Would appreciate any advice on this!
k

Kevin Kho

04/13/2022, 2:17 PM
I looked into this and have the same conclusion. Rrules doesnt handle DST well. You may need to relax the second weekday of the month
m

Matthew Seligson

04/13/2022, 2:19 PM
What about first weekday of the month? This is a fairly common case.
k

Kevin Kho

04/13/2022, 2:25 PM
How about just using an interval schedule/cron schedule and then using a adjustment to push it to the next weekday?
m

Matthew Seligson

04/13/2022, 2:30 PM
How would we get the first weekday of each month with a cron?
Or are you saying get the first day of each month, regardless of whether it is a weekday or weekend, and add one business day?
k

Kevin Kho

04/13/2022, 2:32 PM
You can just do first day of the month and then the adjustment for
next_weekday
9 Views