fix cron on start

This commit is contained in:
Mateusz Gruszczyński 2025-02-24 08:19:24 +01:00
parent 0a9b0f22b8
commit 9b2d2ac7d9

5
app.py
View File

@ -1392,11 +1392,6 @@ def delete_old_logs():
if __name__ == '__main__':
with app.app_context():
scheduler = BackgroundScheduler()
schedule_retention_job()
schedule_auto_export_job()
schedule_auto_binary_backup_job()
scheduler.add_job(func=cleanup_old_logs, trigger='interval', days=1, id="cleanup_logs_job")
reschedule_jobs()
scheduler.start()
atexit.register(lambda: scheduler.shutdown())