import schedule import time import subprocess def job(): print("开始执行定时任务") subprocess.run(["/app/entrypoint.sh", "run_script"], shell=True) print("定时任务执行完成") schedule.every(6).hours.do(job) print("调度器已启动") while True: schedule.run_pending() time.sleep(1)