From fb52536898c2188662ea1e7bff2d2c24af4dcc76 Mon Sep 17 00:00:00 2001 From: DXC Date: Tue, 3 Feb 2026 17:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8=E7=88=AC?= =?UTF-8?q?=E5=8F=96=E6=97=B6=E9=97=B4=E4=B8=BA17=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2_1banben/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/2_1banben/app.py b/2_1banben/app.py index 7bcfcbc..871eb7c 100644 --- a/2_1banben/app.py +++ b/2_1banben/app.py @@ -59,7 +59,7 @@ mimetypes.add_type('text/css', '.css') # ============================================================================== def auto_monitor_job(app): """ - 每天 12:00 触发的爬虫任务 + 每天 17:00 触发的爬虫任务 """ # ✅ 强制使用应用上下文,确保数据库连接有效 with app.app_context(): @@ -192,7 +192,7 @@ def create_app(): func=auto_monitor_job, args=[app], trigger='cron', - hour=12, # 每天 12 点 + hour=17, # 每天 17 点 minute=0, second=0, misfire_grace_time=3600, # 允许延迟1小时执行 @@ -200,7 +200,7 @@ def create_app(): ) # 打印一下确认任务已添加 - print(f"📅 定时任务已锁定: 每天北京时间 12:00 执行") + print(f"📅 定时任务已锁定: 每天北京时间 17:00 执行") app.register_blueprint(device_bp)