d

    Dmitry Dorofeev

    3 years ago
    Hi folks, If I created periodic workflow to run every hour, how can I stop it ? Assume I run in dask.
    Chris White

    Chris White

    3 years ago
    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
    Jeremiah

    Jeremiah

    3 years ago
    Also, if you want it to stop on its own, supply an
    end_time
    to your hourly schedule
    d

    Dmitry Dorofeev

    3 years ago
    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?
    Jeremiah

    Jeremiah

    3 years ago
    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

    3 years ago
    Ok, thanks for the explanation!