video_job.py 433 B

123456789101112131415161718192021
  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. data = Material.video_list() # 假设这是一个异步函数
  8. getVideo.video_task(data) # 假设这是一个异步函数
  9. print("执行完成")
  10. video_start()
  11. schedule.every().day.at("01:00").do(video_start)
  12. while True:
  13. schedule.run_pending()
  14. time.sleep(1)