From 132b247d7caffa84a2092c9f36fb60fe4dba5165 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 17 Mar 2026 15:13:33 -0600 Subject: [PATCH] fix: respect `schedule` flag in backup profiles The `schedule` field in backup profile configuration was never checked when registering backup jobs with the scheduler. This meant backups would always run on schedule even when `schedule: false` was set. Fixes #4039 --- system/src/Grav/Common/Backup/Backups.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/src/Grav/Common/Backup/Backups.php b/system/src/Grav/Common/Backup/Backups.php index 31fc42ccc..a7d1cc631 100644 --- a/system/src/Grav/Common/Backup/Backups.php +++ b/system/src/Grav/Common/Backup/Backups.php @@ -86,6 +86,10 @@ class Backups $inflector = $grav['inflector']; foreach (static::getBackupProfiles() as $id => $profile) { + if (!($profile['schedule'] ?? false)) { + continue; + } + $at = $profile['schedule_at']; $name = $inflector::hyphenize($profile['name']); $logs = 'logs/backup-' . $name . '.out';