move server routes into /system
This commit is contained in:
12
src/cron.js
12
src/cron.js
@@ -31,6 +31,7 @@ const appHealthMonitor = require('./apphealthmonitor.js'),
|
||||
dyndns = require('./dyndns.js'),
|
||||
eventlog = require('./eventlog.js'),
|
||||
janitor = require('./janitor.js'),
|
||||
mail = require('./mail.js'),
|
||||
network = require('./network.js'),
|
||||
paths = require('./paths.js'),
|
||||
safe = require('safetydance'),
|
||||
@@ -45,6 +46,7 @@ const gJobs = {
|
||||
backup: null,
|
||||
updateChecker: null,
|
||||
systemChecks: null,
|
||||
mailStatusCheck: null,
|
||||
diskSpaceChecker: null,
|
||||
certificateRenew: null,
|
||||
cleanupBackups: null,
|
||||
@@ -95,13 +97,19 @@ async function startJobs() {
|
||||
|
||||
gJobs.systemChecks = new CronJob({
|
||||
cronTime: `00 ${minute} 2 * * *`, // once a day. if you change this interval, change the notification messages with correct duration
|
||||
onTick: async () => await safe(cloudron.runSystemChecks(), { debug }),
|
||||
onTick: async () => await safe(system.runSystemChecks(), { debug }),
|
||||
start: true
|
||||
});
|
||||
|
||||
gJobs.mailStatusCheck = new CronJob({
|
||||
cronTime: `00 ${minute} 2 * * *`, // once a day. if you change this interval, change the notification messages with correct duration
|
||||
onTick: async () => await safe(mail.checkStatus(), { debug }),
|
||||
start: true
|
||||
});
|
||||
|
||||
gJobs.diskUsage = new CronJob({
|
||||
cronTime: `00 ${minute} 3 * * *`, // once a day
|
||||
onTick: async () => await safe(cloudron.updateDiskUsage(), { debug }),
|
||||
onTick: async () => await safe(system.updateDiskUsage(), { debug }),
|
||||
start: true
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user