From 804bf3e964463c2bc7cface03d1c0c744a1469dd Mon Sep 17 00:00:00 2001 From: YuruC3 Date: Sun, 9 Aug 2026 11:12:03 +0200 Subject: [PATCH] Fixed one-shot env that was always returning True --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 714fba8..34412d4 100644 --- a/main.py +++ b/main.py @@ -32,7 +32,7 @@ AUTO_ADD_NAME: Final[str] = os.getenv("AUTO_ADD_NAME", "autoBackupScript_one-sho RUN_SCHEDULE: Final[str] = os.getenv("RUN_SCHEDULE", "45 17 * * 5") RUN_SCHEDULE_TZ: Final[str] = os.getenv("RUN_SCHEDULE_TZ", "Europe/Stockholm") -RUN_ONE_SHOT: Final[bool] = bool(os.getenv("RUN_ONE_SHOT", False)) +RUN_ONE_SHOT: Final[bool] = (os.getenv("RUN_ONE_SHOT", "false").lower() == "true") @@ -397,7 +397,7 @@ def theCodeBasically(): if time.monotonic() - SYNC_JOB_DATE >= (PBS_MAX_RUNTIME_MIN * 60): # print(SYNC_JOB_DATE - time.monotonic()) - + # Forcefully skip if these tasks are running. reader task is, I think, PVE backup # Also otherjob is something else and it is better to wait if there is one otherjob if (