improved scheduling

This commit is contained in:
Luke Berndt
2023-05-18 09:39:32 -04:00
parent f8050a3fc5
commit 429e667186

View File

@@ -292,7 +292,9 @@ io.sockets.on('connection', function (client) {
});
stats.init_stats();
let cleanupSched = schedule.scheduleJob('3 * * *', function() {
// This will run at 3am each day.
// IF you don't set the minute to 0, it will run every minute while it is still 3, so at 3:01, 3:02... etc
let cleanupSched = schedule.scheduleJob('0 3 * * *', function() {
db.cleanOldCalls();
});