import schedule import time from xssy_channel.sph_jr_nrxs import SphNrxs def video_start_sph(): print("视频号任务开始...") try: SphNrxs.sph_nrxs_data() print("视频号任务成功完成") except Exception as e: print(f"视频号任务执行过程中发生错误: {e}") print("视频号任务结束") # 每天早上 10:30 执行 schedule.every().day.at("10:30").do(video_start_sph) # SphNrxs.sph_nrxs_data() while True: schedule.run_pending() time.sleep(1)