ensure backups and clean them every 6 hours

also, make sure they don't run at the same time.
This commit is contained in:
Girish Ramakrishnan
2017-05-30 16:03:42 -07:00
parent b04a417cfc
commit 82e53bce36
+2 -2
View File
@@ -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