Is there a way to have a schedule on a flow but fo...
# prefect-community
j
Is there a way to have a schedule on a flow but for it to be turned off by default?
Usecase - is a dev env where never want things running without an explicit trigger
Althoug the actual flows should
I suppose could just switch on an env var
schedule=CronSchedule("0 11 * * *") if ENV_VAR else None
,
rubber duck
k
When registering flows you can choose whether or not to schedule it (this is what I do). From the cli this is
--schedule / --no-schedule
and if you are using flow.register it is
set_schedule_active
https://docs.prefect.io/api/latest/cli/register.html https://docs.prefect.io/api/latest/core/flow.html#flow-2
upvote 2
a
are you asking for Prefect 2.0 or 1.0?