API账号到期短信发送

This commit is contained in:
majintao
2024-09-24 13:12:04 +08:00
parent d6beb9df39
commit a97f0262b1
4 changed files with 23 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
dag_id="send_email",
# 每月1日8点运行
schedule_interval="0 8 1 * *",
start_date=pendulum.datetime(2024, 8, 30, tz="Asia/Shanghai"),
catchup=True,
description="API用户使用及明细的邮件发送"
) as dag:
t1 = BashOperator(
task_id='send_email',
bash_command='python /opt/airflow/dags/repo/dags/business/business/send_email.py',
)
t1