新增API接口监控提醒任务

This commit is contained in:
zhaojixiang@fangjia.com
2023-07-10 17:06:30 +08:00
parent 8fd13e2dd8
commit 2723cb6ef0
2 changed files with 106 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
dag_id="apiuser_notice_dag",
# 每小时运行
schedule_interval="0 * * * * ",
start_date=pendulum.datetime(2023, 7, 10, tz="Asia/Shanghai"),
catchup=True,
description="API接口监控提醒"
) as dag:
t1 = BashOperator(
task_id='apiuser_notice',
bash_command='python /opt/airflow/dags/repo/dags/business/business/apiuser_notice.py',
)
t1