17 lines
499 B
Python
17 lines
499 B
Python
from airflow.providers.standard.operators.bash import BashOperator
|
|
import pendulum
|
|
from airflow import DAG
|
|
|
|
with DAG(
|
|
dag_id="send_sms",
|
|
# 每月1日8点运行
|
|
schedule="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 |