From 31d0a5c40e15cb1cc6e68b6e6e60192ea00771d6 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 6 Feb 2019 11:15:46 -0800 Subject: [PATCH] run system checks immediately post activation this will notify about backup configuration --- src/cloudron.js | 6 +++--- src/cron.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cloudron.js b/src/cloudron.js index d99ce5ab4..42549f2ee 100644 --- a/src/cloudron.js +++ b/src/cloudron.js @@ -18,7 +18,7 @@ exports = module.exports = { setDashboardDomain: setDashboardDomain, renewCerts: renewCerts, - systemChecks: systemChecks, + runSystemChecks: runSystemChecks, // exposed for testing _checkDiskSpace: checkDiskSpace @@ -188,12 +188,12 @@ function isRebootRequired(callback) { } // called from cron.js -function systemChecks() { +function runSystemChecks() { async.parallel([ checkBackupConfiguration, checkDiskSpace ], function () { - debug('systemChecks: done'); + debug('runSystemChecks: done'); }); } diff --git a/src/cron.js b/src/cron.js index 0d8dc6a54..a22044957 100644 --- a/src/cron.js +++ b/src/cron.js @@ -118,8 +118,9 @@ function recreateJobs(tz) { if (gJobs.systemChecks) gJobs.systemChecks.stop(); gJobs.systemChecks = new CronJob({ cronTime: '00 30 * * * *', // every hour - onTick: cloudron.systemChecks, + onTick: cloudron.runSystemChecks, start: true, + runOnInit: true, // run system check immediately timeZone: tz });