""" 小区周边公交DAG """ from airflow.operators.bash import BashOperator import pendulum from airflow import DAG with DAG( "district_bus_dag", # 每月1日9点运行 schedule_interval="0 9 1 * *", start_date=pendulum.datetime(2022, 6, 18, tz="Asia/Shanghai"), catchup=True, ) as dag: t1 = BashOperator( task_id='district_subway', bash_command='python /opt/airflow/dags/repo/dags/poi/business/district_subway.py', ) t2 = BashOperator( task_id='district_bus', bash_command='python /opt/airflow/dags/repo/dags/poi/business/district_bus.py', ) t1 >> t2