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 (