hi, is there a way that we can turn off/on a flow ...
# ask-community
t
hi, is there a way that we can turn off/on a flow schedule from running a CLI command?
k
Not with the Prefect library. You could try doing a cURL statement that hits the graphQL API? The syntax is pretty hard to get right though
t
Got it. Just want to confirm if there is an easy way. In that case I’ll give up quick then 😂
a
if you don't mind your flow version being incremented, you could reregister your flow and disable the schedule while doing that, all from CLI:
Copy code
prefect register --project my-project -p flow.py --no-schedule
t
Thanks @Anna Geller, that sounds doable to me too. But given I’m thinking to do it in CI/CD pipeline, that might blow off the version number to make any sense 😅
a
not necessarily - if you register using CLI, by default Prefect won't bump up the flow version if the flow metadata hasn't changed. This topic explains what is flow metadata and when the version gets incremented
t
oh i see. thanks for sharing!
👍 1