From 0689e887eabdedd2209bab050327629af51ec98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Mon, 24 Feb 2025 08:35:40 +0100 Subject: [PATCH] fix cron on start --- run_waitress.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 run_waitress.py diff --git a/run_waitress.py b/run_waitress.py new file mode 100644 index 0000000..b520293 --- /dev/null +++ b/run_waitress.py @@ -0,0 +1,10 @@ +from waitress import serve +from app import app, reschedule_jobs, scheduler +import atexit + +with app.app_context(): + reschedule_jobs() + scheduler.start() + atexit.register(lambda: scheduler.shutdown()) + +serve(app, host='0.0.0.0', port=5581)