refactor(ti intergration): changed the posting time to be between 6am to 6pm
This commit is contained in:
@@ -68,9 +68,19 @@ export const startNotificationMonitor = async () => {
|
|||||||
if (note.checkInterval > 60) {
|
if (note.checkInterval > 60) {
|
||||||
const hours = Math.floor(totalMinutes / 60); // 1 hour
|
const hours = Math.floor(totalMinutes / 60); // 1 hour
|
||||||
const minutes = totalMinutes % 60; // 45 minutes
|
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 {
|
} else {
|
||||||
time = `*/${note.checkInterval} * * * *`;
|
if (note.name === "tiIntergration") {
|
||||||
|
time = `*/${note.checkInterval} 6-18 * * *`;
|
||||||
|
} else {
|
||||||
|
time = `*/${note.checkInterval} * * * *`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (note.timeType === "hour") {
|
if (note.timeType === "hour") {
|
||||||
|
|||||||
Reference in New Issue
Block a user