From db846c890e4d873cb2210a19fa9d11d3ab8cded3 Mon Sep 17 00:00:00 2001 From: Christopher Hase Date: Mon, 31 Mar 2025 10:39:17 +0200 Subject: [PATCH] more config part 3 --- broker.ts | 7 +------ config.json | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/broker.ts b/broker.ts index 7e01e06..ead3e38 100644 --- a/broker.ts +++ b/broker.ts @@ -48,17 +48,13 @@ function executeCommand(): void { } console.log(`Send E-Mail`); - sendEmail(stdout); - console.log(config.daysInterval, config.timeOfDay); - // Calculate next execution time const nextRunDate = calculateNextRunDate(config.daysInterval, config.timeOfDay); - //console.log(`Gegenwärtig: ` + new Date()); console.log(`Next execution: ${nextRunDate}`); - //Start Scheduling + // Start Scheduling scheduleNextRun(nextRunDate); }); } @@ -80,7 +76,6 @@ async function sendEmail(content: string) { try { const info = await transporter.sendMail({ from: '"The Oracle" ', - //to: "test@mailhog.local", //config to: config.emailReceiver, subject: "Your Horoscope Is Ready", text: content, diff --git a/config.json b/config.json index 4ad956a..3523d07 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { "daysInterval": 2, "timeOfDay": "8:00", - "emailReceiver": "test2@mailhog.local" - } \ No newline at end of file + "emailReceiver": "test@mailhog.local" +} \ No newline at end of file