17 lines
532 B
Python
17 lines
532 B
Python
from airflow.operators.bash import BashOperator
|
|
import pendulum
|
|
from airflow import DAG
|
|
|
|
with DAG(
|
|
"change_new_to_old_seaweed_dag",
|
|
# 每月1日1点运行
|
|
schedule_interval="0 1 1 * *",
|
|
start_date=pendulum.datetime(2023, 2, 10, tz="Asia/Shanghai"),
|
|
catchup=True,
|
|
description="新房变二手房定时脚本"
|
|
) as dag:
|
|
t1 = BashOperator(
|
|
task_id='change_new_to_old_seaweed_dag',
|
|
bash_command='python /opt/airflow/dags/repo/dags/business/business/change_new_to_old_seaweed.py',
|
|
)
|
|
t1 |