From 1d877e8df1e8ec6ad1a9f8b2fdfd23f6072035b0 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Fri, 26 Sep 2025 10:57:42 -0500 Subject: [PATCH] refactor(ti intergration): changed the posting time to be between 6am to 6pm --- .../notifications/utils/processNotifications.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lstV2/server/services/notifications/utils/processNotifications.ts b/lstV2/server/services/notifications/utils/processNotifications.ts index c65f6f2..bb8ac67 100644 --- a/lstV2/server/services/notifications/utils/processNotifications.ts +++ b/lstV2/server/services/notifications/utils/processNotifications.ts @@ -68,9 +68,19 @@ export const startNotificationMonitor = async () => { if (note.checkInterval > 60) { const hours = Math.floor(totalMinutes / 60); // 1 hour const minutes = totalMinutes % 60; // 45 minutes - time = `*/${minutes} */${hours} * * *`; + + // add in a change to be if its tms to do it only between some hours + if (note.name === "tiIntergration") { + time = `*/${minutes} 6-18 * * *`; + } else { + time = `*/${minutes} */${hours} * * *`; + } } else { - time = `*/${note.checkInterval} * * * *`; + if (note.name === "tiIntergration") { + time = `*/${note.checkInterval} 6-18 * * *`; + } else { + time = `*/${note.checkInterval} * * * *`; + } } } if (note.timeType === "hour") {