add calendars.json file to store calendar urls and prefixes

This commit is contained in:
Ryan Mwangi 2024-10-02 14:29:13 +03:00
parent 294747e5a5
commit 4548e452ac
2 changed files with 11 additions and 0 deletions

10
calendars.json Normal file
View File

@ -0,0 +1,10 @@
[
{
"url": "https://example.com/calendar1.ics",
"prefix": "Calendar 1"
},
{
"url": "https://example.com/calendar2.ics",
"prefix": "Calendar 2"
}
]

View File

@ -97,6 +97,7 @@ app.listen(port, () => {
console.log(`Server started on port ${port}`); console.log(`Server started on port ${port}`);
}); });
// Schedule a cron job to update the merged calendar every hour // Schedule a cron job to update the merged calendar every hour
cron.schedule('0 * * * *', () => { cron.schedule('0 * * * *', () => {
console.log('Updating merged calendar...'); console.log('Updating merged calendar...');