Sfoglia il codice sorgente

增加定时任务

zhangyong 1 anno fa
parent
commit
2f870602f3
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      main.py

+ 4 - 1
main.py

@@ -35,7 +35,10 @@ token_thread = threading.Thread(target=check_token)
 token_thread.start()
 
 # 每天下午4点定时启动 video_stitching 方法
-schedule.every().day.at("16:00").do(functools.partial(VideoStitching.video_stitching()))
+def execute_video_stitching():
+    VideoStitching.video_stitching()  # 在此处调用你想要执行的函数
+
+schedule.every().day.at("16:00").do(execute_video_stitching)
 
 
 while True: