diff options
author | Simon Rettberg | 2023-03-10 16:24:12 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-03-10 16:24:12 +0100 |
commit | a2602bcdabd8c5a405c954ebed69a36371e23b3c (patch) | |
tree | d8169d209cff8b67c7abf41cf431b227bd0d4b49 | |
parent | [syslog] Fix syntax error in SQL (diff) | |
download | slx-admin-a2602bcdabd8c5a405c954ebed69a36371e23b3c.tar.gz slx-admin-a2602bcdabd8c5a405c954ebed69a36371e23b3c.tar.xz slx-admin-a2602bcdabd8c5a405c954ebed69a36371e23b3c.zip |
[backup] Make backup interval weekly
-rw-r--r-- | modules-available/backup/hooks/cron.inc.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules-available/backup/hooks/cron.inc.php b/modules-available/backup/hooks/cron.inc.php index 7adbc0a4..c4f976c4 100644 --- a/modules-available/backup/hooks/cron.inc.php +++ b/modules-available/backup/hooks/cron.inc.php @@ -1,7 +1,7 @@ <?php (function () { - if (date('dH') !== '0101' || (int)date('i') >= 5) + if (date('w') !== '0' || (int)date('i') >= 5) return; $mode = Property::get(BackupRestore::PROP_AUTO_BACKUP_MODE, BackupRestore::BACKUP_MODE_OFF); if ($mode === BackupRestore::BACKUP_MODE_OFF) @@ -39,4 +39,5 @@ EventLog::failure("Backup file '{$task['data']['backupFile']}' is not readable"); return; } + Property::set('backup.last-time', time()); })();
\ No newline at end of file |