How do I kill, unschedule or stop a scheduled dag?

12,314 views
Skip to first unread message

Chris Peters

unread,
Sep 16, 2015, 7:17:59 AM9/16/15
to Airflow

I have a dag scheduled.
The dag was started with the following command:

airflow.sh schedule -d airflow_stats_dag &


How do I kill (stop or unschedule) a specific dag?
I have used ps, and  pstree -g -l to identify Python processes
And killed the process with kill -9 < PID >

However the dag continues running
What's the right / best way to unschedule a dag?

Maxime Beauchemin

unread,
Sep 16, 2015, 12:08:31 PM9/16/15
to Airflow
Well you like any other process you just have to send it a SIGTERM or SIGINT, so if you ran "airflow scheduler &", then you'd run "fg" to bring the process to the foreground and then CTRL-C out of it. While I've seen Celery and the web server might leave zombie threads around, I've never had any problems with killing the scheduler.

In despair, this should always work:
sudo pkill -9 -f "airflow scheduler"

Max


Maxime Beauchemin

unread,
Sep 16, 2015, 12:08:52 PM9/16/15
to Airflow
Oh and you can pause any DAG from getting scheduled from the UI's main page.
Reply all
Reply to author
Forward
0 new messages