forked from ryanmwangi/CalMerger
get rid of the cron schedule
This commit is contained in:
parent
03cf9f85d0
commit
90f698c84f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue