Hi folks, If I created periodic workflow to run e...
# ask-community
d
Hi folks, If I created periodic workflow to run every hour, how can I stop it ? Assume I run in dask.
c
If you are running using Prefect Core, scheduled runs occur in the python process that
flow.run()
was called from - consequently, to stop it, just kill the process (e.g.,
CTRL+C
). If running in Prefect Cloud, schedules can be toggled active / in-active both from the UI and via GraphQL
j
Also, if you want it to stop on its own, supply an
end_time
to your hourly schedule
⬆️ 1
d
Thanks guys, but what if I start hourly workflow in prod env in the Dask cluster. And later (say in a week) the urgent need to stop workflow arrives. Should I stop Dask cluster or something more precise is available?
j
If you quit the Python process running Prefect, then no more runs will be submitted to the Dask cluster, but the current run will keep running. If you kill the Dask cluster, everything will stop instantly.
Prefect Cloud will offer some more fine-grained ways for handling this. For example, stopping only a specific run but allowing other runs to continue.
d
Ok, thanks for the explanation!