mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 07:15:27 +02:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user