import schedule import time from xssy_channel.dy_rdb_nrxs import DyRdbNrxs 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("视频号任务结束") def video_start_dy(): print("抖音任务开始...") try: DyRdbNrxs.get_dy_rdb_nrxs() print("抖音任务成功完成") except Exception as e: print(f"抖音任务执行过程中发生错误: {e}") print("抖音任务结束") # 每天早上 10:30 执行 schedule.every().day.at("10:30").do(video_start_sph) schedule.every().day.at("03:30").do(video_start_dy) # DyRdbNrxs.get_dy_rdb_nrxs() SphNrxs.sph_nrxs_data() while True: schedule.run_pending() time.sleep(1)