17 lines
510 B
Python
17 lines
510 B
Python
from airflow.operators.bash import BashOperator
|
|
import pendulum
|
|
from airflow import DAG
|
|
|
|
with DAG(
|
|
dag_id="evaluate_ratio_dag",
|
|
# 每月1日0点运行
|
|
schedule_interval="0 0 1 * *",
|
|
start_date=pendulum.datetime(2023, 7, 5, tz="Asia/Shanghai"),
|
|
catchup=True,
|
|
description="挂牌价与成交价计算价格系数"
|
|
) as dag:
|
|
t1 = BashOperator(
|
|
task_id='evaluate_ratio',
|
|
bash_command='python /opt/airflow/dags/repo/dags/business/business/evaluate_ratio.py',
|
|
)
|
|
t1 |