diff --git a/src/cron.js b/src/cron.js index d3d6a1c94..ddb030cb5 100644 --- a/src/cron.js +++ b/src/cron.js @@ -75,14 +75,14 @@ async function startJobs() { gJobs.diskSpaceChecker = new CronJob({ cronTime: '00 30 * * * *', // every 30 minutes. if you change this interval, change the notification messages with correct duration - onTick: async () => await safe(system.checkDiskSpace()), + onTick: async () => await safe(system.checkDiskSpace(), { debug }), start: true }); // this is run separately from the update itself so that the user can disable automatic updates but can still get a notification gJobs.updateCheckerJob = new CronJob({ cronTime: `${randomTick} ${randomTick} 1,5,9,13,17,21,23 * * *`, - onTick: async () => await updateChecker.checkForUpdates({ automatic: true }), + onTick: async () => await safe(updateChecker.checkForUpdates({ automatic: true }), { debug }), start: true }); @@ -112,7 +112,7 @@ async function startJobs() { gJobs.schedulerSync = new CronJob({ cronTime: constants.TEST ? '*/10 * * * * *' : '00 */1 * * * *', // every minute - onTick: async () => await safe(scheduler.sync()), + onTick: async () => await safe(scheduler.sync(), { debug }), start: true }); @@ -124,7 +124,7 @@ async function startJobs() { gJobs.appHealthMonitor = new CronJob({ cronTime: '*/10 * * * * *', // every 10 seconds - onTick: async () => await safe(appHealthMonitor.run(10)), // 10 is the max run time + onTick: async () => await safe(appHealthMonitor.run(10), { debug }), // 10 is the max run time start: true }); @@ -218,7 +218,7 @@ function dynamicDnsChanged(enabled) { if (enabled) { gJobs.dynamicDns = new CronJob({ cronTime: '5 * * * * *', // we only update the records if the ip has changed. - onTick: async () => await safe(dyndns.sync(auditSource.CRON)), + onTick: async () => await safe(dyndns.sync(auditSource.CRON), { debug }), start: true }); } else {