From 221572f5e43bd8cd7215ff23b08929fa965d142f Mon Sep 17 00:00:00 2001 From: Christopher Hase Date: Fri, 28 Mar 2025 14:54:24 +0100 Subject: [PATCH] schedule next run part 9 --- broker.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/broker.ts b/broker.ts index ceb6a7f..2997114 100644 --- a/broker.ts +++ b/broker.ts @@ -96,7 +96,7 @@ async function sendEmail(content: string) { function calculateNextRunDate(daysInterval: number, timeOfDay: string): Date { const currentDate = new Date(); - /*// Splitte die Uhrzeit in Stunden und Minuten + // Splitte die Uhrzeit in Stunden und Minuten const [hours, minutes] = timeOfDay.split(':').map(Number); // Berechne das Datum für die nächste Ausführung @@ -110,11 +110,11 @@ function calculateNextRunDate(daysInterval: number, timeOfDay: string): Date { // Berechne das Datum für den nächsten Ausführungszeitpunkt unter Berücksichtigung von X Tagen currentDate.setDate(currentDate.getDate() + daysInterval); - return currentDate;*/ - - currentDate.setMinutes(currentDate.getMinutes() + 2); //TODO: JUST FOR DEBUGGING!!! - return currentDate; + + //TODO: JUST FOR DEBUGGING!!! + /*currentDate.setMinutes(currentDate.getMinutes() + 2); + return currentDate;*/ } //Schedule the next process loop.