From 90f698c84f40faa80f03b29646d4a1cbb4704551 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Fri, 25 Oct 2024 15:45:55 +0300 Subject: [PATCH] get rid of the cron schedule --- server.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/server.js b/server.js index 86bd5c9..e1b9dd0 100644 --- a/server.js +++ b/server.js @@ -306,14 +306,6 @@ app.post('/refresh/:id', async (req, res) => { } }); -// Schedule a cron job to update the merged calendar every hour -cron.schedule('1 * * * *', () => { - console.log('Updating merged calendar...'); - const calendarsData = JSON.parse(fs.readFileSync(CALENDARS_FILE, 'utf8')); - calendarsData.mergedCalendars.forEach((mergedCalendar) => { - updateMergedCalendars(mergedCalendar.id); - }); -}); // Start the server const port = 3000;