新增格子均价
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from airflow.operators.bash import BashOperator
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="grid_price_dag",
|
||||
# 每周二运行
|
||||
schedule_interval="0 3 * * 2",
|
||||
start_date=pendulum.datetime(2023, 5, 9, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="全国格子价格计算"
|
||||
) as dag:
|
||||
t1 = BashOperator(
|
||||
task_id='grid_price',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/grid_price.py {{dag_run.conf["city"] if "city" in dag_run.conf}}',
|
||||
)
|
||||
t1
|
||||
Reference in New Issue
Block a user