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="apiuser_notice_dag",
|
|
# 每小时运行
|
|
schedule="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 |