From 82e53bce3684b891e5efaa6a9bab84ee5d0cd998 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 30 May 2017 16:03:42 -0700 Subject: [PATCH] ensure backups and clean them every 6 hours also, make sure they don't run at the same time. --- src/cron.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cron.js b/src/cron.js index 9478f7368..f9c43f528 100644 --- a/src/cron.js +++ b/src/cron.js @@ -92,7 +92,7 @@ function recreateJobs(tz) { if (gBackupJob) gBackupJob.stop(); gBackupJob = new CronJob({ - cronTime: '00 00 */4 * * *', // every 4 hours. backups.ensureBackup() will only trigger a backup once per day + cronTime: '00 00 */6 * * *', // every 6 hours. backups.ensureBackup() will only trigger a backup once per day onTick: backups.ensureBackup.bind(null, AUDIT_SOURCE, NOOP_CALLBACK), start: true, timeZone: tz @@ -135,7 +135,7 @@ function recreateJobs(tz) { if (gCleanupBackupsJob) gCleanupBackupsJob.stop(); gCleanupBackupsJob = new CronJob({ - cronTime: '00 00 */4 * * *', // every 4 hours + cronTime: '00 45 */6 * * *', // every 6 hours. try not to overlap with ensureBackup job onTick: backups.cleanup, start: true, timeZone: tz