From 4548e452acf40468653f0544f2344aa0d74c65c8 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Wed, 2 Oct 2024 14:29:13 +0300 Subject: [PATCH] add calendars.json file to store calendar urls and prefixes --- calendars.json | 10 ++++++++++ server.js | 1 + 2 files changed, 11 insertions(+) create mode 100644 calendars.json diff --git a/calendars.json b/calendars.json new file mode 100644 index 0000000..94c9793 --- /dev/null +++ b/calendars.json @@ -0,0 +1,10 @@ +[ + { + "url": "https://example.com/calendar1.ics", + "prefix": "Calendar 1" + }, + { + "url": "https://example.com/calendar2.ics", + "prefix": "Calendar 2" + } +] \ No newline at end of file diff --git a/server.js b/server.js index cf81b3b..fe9ddd9 100644 --- a/server.js +++ b/server.js @@ -97,6 +97,7 @@ app.listen(port, () => { console.log(`Server started on port ${port}`); }); + // Schedule a cron job to update the merged calendar every hour cron.schedule('0 * * * *', () => { console.log('Updating merged calendar...');