Hi all, does anyone have any tricks to only respec...
# ask-community
b
Hi all, does anyone have any tricks to only respect a schedule based on a project name? Our use case is that we use prefect projects for our environments/branches (e.g. we have a master project, a staging project a branch_1 project etc etc), but we want to turn off all scheduling for everything apart from the master branch. We currently do some monkey patching at register time to set the schedule=None, but we'd rather have something in the prefect CLI. For example
prefect register flow_name --label=staging --no-schedule
We've also messed about with setting a bad label on the schedule itself, which "kind of" works, as in the flow won't run because it can't find an agent, but, the UI still get overwhelmed with flows being scheduled, but not being able to be run.
k
Hi @Ben Davison! I’m looking into this
Clever approach with the label by the way bit yes that runs into issues in the long run unfortunately.
You can use automations to clear the flow runs being scheduled with those labels I think
And then I guess you can use a graphql call to remove the schedule. I will also elevate your feedback.
b
Thanks Kevin, will look at those suggestions
z
@Marvin open "Expose disabling schedule from
prefect register
CLI"