Files
airflow/dags/business/dag_send_sms.py
T
2024-09-24 13:18:17 +08:00

17 lines
489 B
Python

from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
dag_id="send_sms",
# 每月1日8点运行
schedule_interval="0 8 * * *",
start_date=pendulum.datetime(2024, 9, 25, tz="Asia/Shanghai"),
catchup=True,
description="API用户使用及明细的邮件发送"
) as dag:
t1 = BashOperator(
task_id='send_sms',
bash_command='python /opt/airflow/dags/repo/dags/business/business/send_sms.py',
)
t1