23 lines
558 B
Python
23 lines
558 B
Python
"""
|
|
小区周边配套DAG
|
|
"""
|
|
from airflow.providers.standard.operators.bash import BashOperator
|
|
|
|
import pendulum
|
|
|
|
from airflow import DAG
|
|
|
|
with DAG(
|
|
dag_id="district_facilities_dag",
|
|
# 每月1日1点运行
|
|
schedule="0 1 1 * *",
|
|
start_date=pendulum.datetime(2024, 7, 17, tz="Asia/Shanghai"),
|
|
catchup=True
|
|
) as dag:
|
|
t1 = BashOperator(
|
|
task_id='district_facilities',
|
|
bash_command='python /opt/airflow/dags/repo/dags/poi/business/district_facilities.py {{dag_run.conf["type"] if "type" in dag_run.conf}} ',
|
|
)
|
|
t1
|
|
|