19 lines
526 B
Python
19 lines
526 B
Python
from datetime import timedelta
|
|
|
|
from airflow.providers.standard.operators.bash import BashOperator
|
|
import pendulum
|
|
from airflow import DAG
|
|
|
|
with DAG(
|
|
dag_id="fangjia_log_dag",
|
|
# 每2分钟监控
|
|
schedule=timedelta(minutes=2),
|
|
start_date=pendulum.datetime(2024, 8, 14, tz="Asia/Shanghai"),
|
|
catchup=True,
|
|
description="OPEN日志监控"
|
|
) as dag:
|
|
t1 = BashOperator(
|
|
task_id='fangjia_log',
|
|
bash_command='python /opt/airflow/dags/repo/dags/business/business/fangjia_log.py',
|
|
)
|
|
t1 |