From feb4d83b8d80b0b007ce7edbd321445599087d9b Mon Sep 17 00:00:00 2001 From: xbh <6726613@qq.com> Date: Sat, 18 Oct 2025 20:17:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E6=88=90=E4=BA=86=E6=AF=8F=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E6=95=B4=E7=82=B9=E6=89=A7=E8=A1=8C=E6=8A=96=E9=9F=B3?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E9=87=8F=E6=8A=93=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Timer_worker.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Timer_worker.py b/Timer_worker.py index 6ea5a97..de30e5d 100644 --- a/Timer_worker.py +++ b/Timer_worker.py @@ -266,9 +266,10 @@ class DouyinAutoScheduler: def setup_schedule(self): """设置定时任务""" - # 每小时执行一次抖音播放量抓取 - schedule.every().hour.do(self.run_douyin_scraper) - logging.info(f"⏰ 定时器已设置:每小时执行抖音播放量抓取") + # 每小时的整点执行抖音播放量抓取 + schedule.every().hour.at(":00").do(self.run_douyin_scraper) + + logging.info(f"⏰ 定时器已设置:每小时整点执行抖音播放量抓取") def show_next_run(self): """显示下次执行时间""" @@ -307,7 +308,7 @@ class DouyinAutoScheduler: time.sleep(1) # 每分钟显示一次状态 - if int(time.time()) % 60 == 0: + if int(time.time()) % 600 == 0: self.show_next_run() except KeyboardInterrupt: