video_job.py 364 B

1234567891011121314151617181920
  1. import time
  2. import schedule
  3. from common import Material
  4. from video_rewriting.video_prep import getVideo
  5. def video_start():
  6. print("开始执行")
  7. getVideo.video_task() # 假设这是一个异步函数
  8. print("执行完成")
  9. # video_start()
  10. schedule.every().day.at("05:30").do(video_start)
  11. while True:
  12. schedule.run_pending()
  13. time.sleep(1)