https://prefect.io logo
#prefect-community
Title
# prefect-community
d

Dmitry Dorofeev

08/24/2019, 9:58 PM
Hi folks, If I created periodic workflow to run every hour, how can I stop it ? Assume I run in dask.
c

Chris White

08/24/2019, 10:24 PM
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

Jeremiah

08/24/2019, 10:39 PM
Also, if you want it to stop on its own, supply an
end_time
to your hourly schedule
⬆️ 1
d

Dmitry Dorofeev

08/25/2019, 9:58 AM
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

Jeremiah

08/25/2019, 1:23 PM
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

Dmitry Dorofeev

08/25/2019, 2:30 PM
Ok, thanks for the explanation!
2 Views