refactor(ti intergration): changed the posting time to be between 6am to 6pm

This commit is contained in:
2025-09-26 10:57:42 -05:00
parent e03189b191
commit 1d877e8df1

View File

@@ -68,11 +68,21 @@ export const startNotificationMonitor = async () => {
if (note.checkInterval > 60) {
const hours = Math.floor(totalMinutes / 60); // 1 hour
const minutes = totalMinutes % 60; // 45 minutes
// 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 {
if (note.name === "tiIntergration") {
time = `*/${note.checkInterval} 6-18 * * *`;
} else {
time = `*/${note.checkInterval} * * * *`;
}
}
}
if (note.timeType === "hour") {
const totalHours = note.checkInterval;
if (note.checkInterval > 60) {