Regarding the Dagster scheduler decorator: is it p...
# ask-community
k
Regarding the Dagster scheduler decorator: is it possible to, for example, create a schedule which runs once per month on the last weekday of the month? Typically this sort of thing is done with a script in conjunction with cron - is this functionality supported in any way through Dagster? Thanks!
s
The best way do this is to use the
should_execute
callback argument in @schedule
So you would set it up to run daily but then skip all the runs except the last weekday of the month
You’d write some python code to encode that logic
k
Awesome, thanks
s
Btw @Kieron Ellis we do have an example but it is slightly off. See https://github.com/dagster-io/dagster/issues/4291
use context.scheduled_execution_time