diff --git a/CHANGES b/CHANGES index bb59a9519..26ad63c47 100644 --- a/CHANGES +++ b/CHANGES @@ -2561,4 +2561,5 @@ * Show remaining disk space in usage graph * Make users and groups available for the new app link dialog * Show swaps in disk graphs +* disk usage: run once a day diff --git a/src/cron.js b/src/cron.js index fabbbad74..3058551e0 100644 --- a/src/cron.js +++ b/src/cron.js @@ -50,7 +50,8 @@ const gJobs = { dockerVolumeCleaner: null, dynamicDns: null, schedulerSync: null, - appHealthMonitor: null + appHealthMonitor: null, + diskUsage: null }; // cron format @@ -95,6 +96,12 @@ async function startJobs() { start: true }); + gJobs.diskUsage = new CronJob({ + cronTime: `00 ${minute} 3 * * *`, // once a day + onTick: async () => await safe(cloudron.updateDiskUsage(), { debug }), + start: true + }); + 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(), { debug }),