Fixed one-shot env that was always returning True

This commit is contained in:
2026-08-09 11:12:03 +02:00
parent aa74cf42f8
commit 804bf3e964

View File

@@ -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 (