From 53ee5212bc0fe9f12fbca88b420d61abc4a8f1e1 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Mon, 26 Feb 2024 15:01:49 +0200 Subject: [PATCH] [#4431] always refresh the app settings before loading the backup cron job --- core/base_backup.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/base_backup.go b/core/base_backup.go index c624d28c..860de370 100644 --- a/core/base_backup.go +++ b/core/base_backup.go @@ -248,6 +248,11 @@ func (app *BaseApp) initAutobackupHooks() error { loadJob := func() { c.Stop() + // make sure that app.Settings() is always up to date + // + // @todo remove with the refactoring as core.App and daos.Dao will be one. + app.RefreshSettings() + rawSchedule := app.Settings().Backups.Cron if rawSchedule == "" || !isServe || !app.IsBootstrapped() { return