run disk usage task once a day
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+8
-1
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user