17 lines
494 B
Python
17 lines
494 B
Python
from airflow import DAG
|
|
from airflow.operators.bash import BashOperator
|
|
import pendulum
|
|
|
|
with DAG(
|
|
dag_id="community_rating_dag",
|
|
# 每月的最后一天运行
|
|
schedule_interval="0 20 * * 6",
|
|
start_date=pendulum.datetime(2024, 7, 12, tz="Asia/Shanghai"),
|
|
description="小区楼盘评级计算",
|
|
catchup=True
|
|
) as dag:
|
|
t1 = BashOperator(
|
|
task_id='community_rating',
|
|
bash_command='python /opt/airflow/dags/repo/dags/stat/community/rate.py'
|
|
)
|
|
t1 |