Files
airflow/dags/business/community_summary_dag.py
T
2022-10-12 17:07:33 +08:00

17 lines
588 B
Python

from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
"community_summary_dag",
# 每月2日1点整分运行
schedule_interval="0 1 2 * *",
start_date=pendulum.datetime(2022, 10, 12, tz="Asia/Shanghai"),
catchup=True,
description="地址输出信息分类数据定时更新"
) as dag:
t1 = BashOperator(
task_id='community_summary_dag',
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/community_summary.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
)
t1