routeros_backup/run_waitress.py
Mateusz Gruszczyński 0689e887ea fix cron on start
2025-02-24 08:35:40 +01:00

11 lines
247 B
Python

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)