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
This commit is contained in:
Andy Miller
2026-03-17 15:13:33 -06:00
parent deb29a2c1f
commit 132b247d7c

View File

@@ -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';