Randomize certificate renewal check over a whole day
This commit is contained in:
@@ -114,8 +114,9 @@ async function startJobs() {
|
||||
start: true
|
||||
});
|
||||
|
||||
// randomized over minute an hours, once a day to not hammer Let'sEncrypt on the same schedule
|
||||
gJobs.certificateRenew = new CronJob({
|
||||
cronTime: '00 00 */12 * * *', // every 12 hours
|
||||
cronTime: `00 ${parseInt(Math.random()*60)} ${parseInt(Math.random()*24)} * * *`,
|
||||
onTick: async () => await safe(cloudron.renewCerts({}, AuditSource.CRON), { debug }),
|
||||
start: true
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user