From 0f0b170da302ded862a0510aada7b59a1709c5ce Mon Sep 17 00:00:00 2001 From: redhongx <1144981128@qq.com> Date: Thu, 4 Jul 2024 15:15:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90app.py=E3=80=91=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E8=B0=83=E5=BA=A6=E5=99=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index f54b7a2..48a8903 100644 --- a/app.py +++ b/app.py @@ -44,15 +44,15 @@ def run_script(): for script_name, script_path in scripts: try: print(f"Running {script_name}...") - result = subprocess.run(['python', script_path], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - print(f"{script_name} finished successfully. Output:\n{result.stdout.decode()}") + subprocess.run(['python', script_path], check=True) + print(f"{script_name} finished successfully.") except subprocess.CalledProcessError as e: - print(f"An error occurred while running {script_name}: {e.stderr.decode()}") + print(f"An error occurred while running {script_name}: {e}") if __name__ == '__main__': scheduler = BackgroundScheduler(timezone=utc) - scheduler.add_job(run_script, 'interval', hours=5) + scheduler.add_job(run_script, 'interval', minutes=1) scheduler.start() try: