teddy 699bac8008 feat: 更新定时任务时间并添加批量处理脚本
- 将定时任务时间从12:00改为14:39
- 新增start_scheduler.bat脚本用于管理进程
- 在config.py中添加messages_reciever配置项
- 优化sendmsg.py代码结构,使用配置项代替硬编码
2025-06-24 14:50:22 +08:00

19 lines
431 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import schedule
import time
import subprocess
import sys
import os
def run_sendmsg():
script_path = os.path.join(os.path.dirname(__file__), 'sendmsg.py')
subprocess.run([sys.executable, script_path])
# 设置每天12点运行
schedule.every().day.at("14:39").do(run_sendmsg)
print("定时任务已启动将在每天12:00运行sendmsg.py")
# 保持程序运行
while True:
schedule.run_pending()
time.sleep(1)