forked from ryanmwangi/CalMerger
move sheduled update from client side
This commit is contained in:
parent
094123b768
commit
294747e5a5
|
@ -41,9 +41,4 @@ const form = document.getElementById('merge-form');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//regular refresh
|
|
||||||
const refreshInterval = 60 * 60 * 1000; // 1 hour
|
|
||||||
setInterval(() => {
|
|
||||||
// Fetch new calendar data and update the merged calendar
|
|
||||||
updateMergedCalendar();
|
|
||||||
}, refreshInterval);
|
|
|
@ -101,4 +101,4 @@ app.listen(port, () => {
|
||||||
cron.schedule('0 * * * *', () => {
|
cron.schedule('0 * * * *', () => {
|
||||||
console.log('Updating merged calendar...');
|
console.log('Updating merged calendar...');
|
||||||
// TO DO: implement the logic to update the merged calendar
|
// TO DO: implement the logic to update the merged calendar
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue