From 429e6671863bcd6eeb2cbb2dab6a04462dbfd1d9 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Thu, 18 May 2023 09:39:32 -0400 Subject: [PATCH] improved scheduling --- backend/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/index.js b/backend/index.js index 94b8f0a..efb5828 100644 --- a/backend/index.js +++ b/backend/index.js @@ -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(); });