From 876fcb60b06ec70cd5765405a9e84a9123630ab6 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 17 Jun 2026 15:56:43 +0200 Subject: [PATCH] Chunk, then sleep until next schedule --- paperless_to_openwebui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paperless_to_openwebui.py b/paperless_to_openwebui.py index 478ba13..6576aeb 100644 --- a/paperless_to_openwebui.py +++ b/paperless_to_openwebui.py @@ -732,10 +732,10 @@ if __name__ == "__main__": print(f"Container started, task will run daily at {RUN_AT}", flush=True) while True: try: + main() wait_seconds = calc_wait_time(RUN_AT) print(f"Next run in {wait_seconds / 3600:.2f} hours.", flush=True) time.sleep(wait_seconds) - main() except KeyboardInterrupt: print("Container stopped manually", flush=True) sys.exit(0)