fix cron on start
This commit is contained in:
parent
011590612e
commit
c9a5bfaaf8
6
app.py
6
app.py
@ -608,9 +608,9 @@ scheduler = BackgroundScheduler()
|
||||
# 2) Auto-backup (default co 1 dzień)
|
||||
|
||||
# Dodajemy z unikalnymi ID, co ułatwia re-schedulowanie
|
||||
scheduler.add_job(func=cleanup_old_backups, trigger='interval', days=1, id="cleanup_job")
|
||||
scheduler.add_job(func=scheduled_auto_backup, trigger='interval', days=1, id="auto_backup_job")
|
||||
scheduler.start()
|
||||
#scheduler.add_job(func=cleanup_old_backups, trigger='interval', days=1, id="cleanup_job")
|
||||
#scheduler.add_job(func=scheduled_auto_backup, trigger='interval', days=1, id="auto_backup_job")
|
||||
#scheduler.start()
|
||||
|
||||
# Sprzątanie przy zamykaniu
|
||||
atexit.register(lambda: scheduler.shutdown())
|
||||
|
Loading…
x
Reference in New Issue
Block a user