1. 停止脚本
#!/bin/bash
ps -ef | grep -Ei '(airflow webserver)' | awk '{print $2}' | xargs -i kill {}
ps -ef | grep -Ei '(airflow-webserver)' | awk '{print $2}' | xargs -i kill {}
ps -ef | grep -Ei '(airflow scheduler)' | awk '{print $2}' | xargs -i kill {}
ps -ef | grep -Ei '(airflow-scheduler)' | awk '{print $2}' | xargs -i kill {}
ps -ef | grep -Ei '(airflow serves-logs)' | awk '{print $2}' | xargs -i kill {}
2. 启动脚本
#!/bin/bash
nohup airflow webserver >> airflow.log &
nohup airflow scheduler >> airflow.log &
# Celery 方式需要启动
nohup airflow celery flower >> airflow.log &
nohup airflow celery worker >> airflow.log &