get rid of the cron schedule

This commit is contained in:
Ryan Mwangi 2024-10-25 15:45:55 +03:00
parent 03cf9f85d0
commit 90f698c84f
1 changed files with 0 additions and 8 deletions

View File

@ -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;