fixing saving to public folder
This commit is contained in:
parent
9442a17150
commit
70aa6c0dd2
2 changed files with 13 additions and 13 deletions
|
@ -5,9 +5,9 @@ PRODID:https://mhaifafc.com/
|
||||||
METHOD:PUBLISH
|
METHOD:PUBLISH
|
||||||
X-PUBLISHED-TTL:PT1H
|
X-PUBLISHED-TTL:PT1H
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
UID:_5qS0t0NPnxt7ysQhiM1b
|
UID:Od0AeXkvLYZ2ELyVyCf3w
|
||||||
SUMMARY:Maccabi Haifa F.C.
|
SUMMARY:Maccabi Haifa F.C.
|
||||||
DTSTAMP:20230402T122458Z
|
DTSTAMP:20230402T123647Z
|
||||||
DTSTART:20230404T173000Z
|
DTSTART:20230404T173000Z
|
||||||
DTEND:20230404T193000Z
|
DTEND:20230404T193000Z
|
||||||
DESCRIPTION:Maccabi Tel aviv vs. Maccabi Haifa
|
DESCRIPTION:Maccabi Tel aviv vs. Maccabi Haifa
|
||||||
|
@ -19,9 +19,9 @@ ORGANIZER;CN=Maccabi Haifa F.C.
|
||||||
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
||||||
END:VEVENT
|
END:VEVENT
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
UID:gOdljSPvOnSsLTwF_JSdA
|
UID:OCMexF1apX1IoP8K9qHCQ
|
||||||
SUMMARY:Maccabi Haifa F.C.
|
SUMMARY:Maccabi Haifa F.C.
|
||||||
DTSTAMP:20230402T122458Z
|
DTSTAMP:20230402T123647Z
|
||||||
DTSTART:20230408T170000Z
|
DTSTART:20230408T170000Z
|
||||||
DTEND:20230408T190000Z
|
DTEND:20230408T190000Z
|
||||||
DESCRIPTION:Maccabi Haifa vs. Maccabi Netanya
|
DESCRIPTION:Maccabi Haifa vs. Maccabi Netanya
|
||||||
|
@ -33,9 +33,9 @@ ORGANIZER;CN=Maccabi Haifa F.C.
|
||||||
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
||||||
END:VEVENT
|
END:VEVENT
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
UID:6VKjleqclIMSj6TG7bx4_
|
UID:4Qab1aW2S5xDL3OC-3_sA
|
||||||
SUMMARY:Maccabi Haifa F.C.
|
SUMMARY:Maccabi Haifa F.C.
|
||||||
DTSTAMP:20230402T122458Z
|
DTSTAMP:20230402T123647Z
|
||||||
DTSTART:20230415T153000Z
|
DTSTART:20230415T153000Z
|
||||||
DTEND:20230415T173000Z
|
DTEND:20230415T173000Z
|
||||||
DESCRIPTION:Hapoel Jerusalem vs. Maccabi Haifa
|
DESCRIPTION:Hapoel Jerusalem vs. Maccabi Haifa
|
||||||
|
@ -47,9 +47,9 @@ ORGANIZER;CN=Maccabi Haifa F.C.
|
||||||
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
||||||
END:VEVENT
|
END:VEVENT
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
UID:yabS2xjYG6txukIHZCeFV
|
UID:N3At5VutrWAUaQiaNkwm6
|
||||||
SUMMARY:Maccabi Haifa F.C.
|
SUMMARY:Maccabi Haifa F.C.
|
||||||
DTSTAMP:20230402T122458Z
|
DTSTAMP:20230402T123647Z
|
||||||
DTSTART:20230423T173000Z
|
DTSTART:20230423T173000Z
|
||||||
DTEND:20230423T193000Z
|
DTEND:20230423T193000Z
|
||||||
DESCRIPTION:F.C Ashdod vs. Maccabi Haifa
|
DESCRIPTION:F.C Ashdod vs. Maccabi Haifa
|
||||||
|
@ -61,9 +61,9 @@ ORGANIZER;CN=Maccabi Haifa F.C.
|
||||||
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
|
||||||
END:VEVENT
|
END:VEVENT
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
UID:cuLZKgXMny8Utk3LInSVj
|
UID:QTleUThXSlGWTOZo2moK5
|
||||||
SUMMARY:Maccabi Haifa F.C.
|
SUMMARY:Maccabi Haifa F.C.
|
||||||
DTSTAMP:20230402T122458Z
|
DTSTAMP:20230402T123647Z
|
||||||
DTSTART:20230501T173000Z
|
DTSTART:20230501T173000Z
|
||||||
DTEND:20230501T193000Z
|
DTEND:20230501T193000Z
|
||||||
DESCRIPTION:H Be'er Sheva vs. Maccabi Haifa
|
DESCRIPTION:H Be'er Sheva vs. Maccabi Haifa
|
||||||
|
|
|
@ -34,8 +34,7 @@ class App {
|
||||||
}
|
}
|
||||||
|
|
||||||
const app = new App();
|
const app = new App();
|
||||||
|
console.log("Declaring Cron Job every day at 10:00")
|
||||||
console.log("Declaring Cron Job")
|
|
||||||
|
|
||||||
const cron = "0 10 * * *" // every day at 10:00
|
const cron = "0 10 * * *" // every day at 10:00
|
||||||
|
|
||||||
|
@ -43,10 +42,11 @@ const job = new CronJob(
|
||||||
"* * * * *",
|
"* * * * *",
|
||||||
async () => {
|
async () => {
|
||||||
console.log("START")
|
console.log("START")
|
||||||
const outputFileLocation = 'maccabi-haifa-fc.ics';
|
const outputFileLocation = 'public/maccabi-haifa-fc.ics';
|
||||||
const games = await app.gameSource.getGamesFromHaifa();
|
const games = await app.gameSource.getGamesFromHaifa();
|
||||||
const icsEvents = app.ics.generateIcsOutputFromGames(games);
|
const icsEvents = app.ics.generateIcsOutputFromGames(games);
|
||||||
fs.writeFileSync(outputFileLocation, icsEvents);
|
fs.writeFileSync(outputFileLocation, icsEvents);
|
||||||
|
console.log("END")
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
|
|
Loading…
Reference in a new issue