I saw some posts mon-fri 8am-9pm, tested with stream and it work fine but this is basic.
Alert triger between 2 date/time range
Adding this in where, work fine
hour(“time”) >= 8 AND hour(“time”) <= 17 weekday(“time”) >=1 and weekday("time) <=5
But what we need its to trigger alert only between mon 1:30am to fri 23:35pm when application run basically, similar as ITRS time rule.
Basically something like below
(Weekday(“time”)>=1 and hour(“time”)>=1 and minute(“time”)>=30) and (weekday(“time”) <=5 and hour(“time”) <= 23 and minute(“time”) <= 35)
Your expertise and feedback on how to achieve above.
Or as workaround using slideload
I tried as below even maintenance set to true on yml file and can see true in the log, alert is still triggered which should not be the case.
But what we need its to trigger alert only between mon 1:30am to fri
23:35pm when application run basically, similar as ITRS time rule.
I assume you mean “between 01:30 and 23:35 on each of five days a week” and not
“starting at 01:30 on Monday and finishing at 23:35 on Friday”.
Basically something like below
(Weekday(“time”)>=1 and hour(“time”)>=1 and minute(“time”)>=30) and
(weekday(“time”) <=5 and hour(“time”) <= 23 and minute(“time”) <= 35)
Let’s just break that down - the bracketing makes no difference since every
operator is AND.
weekday must be >=1
weekday must be <=5
hour must be >=1
hour must be <=23
minute must be >=30
minute must be <=35
So, that entire expression will be TRUE on Mondays to Fridays between the
times:
01:30 - 01:35
02:30 - 02:35
03:30 - 03:35 etc…
So, I think what you really want is:
weekday(time)>0 and weekday(time)<6 and
( (hour(time)=0 and minute(time)>29)
or (hour(time)>0 and hour(time)<23)
or (hour(time)=23 and minute(time)<36) )
Weekly process as below.
“starting at 01:30 on Monday and finishing at 23:35 on Friday, thats a
weekly process running.
( (weekday(time)=1 and hour(time)=1 and minute(time)>29) or
(weekday(time)=1 and hour(time)>1) or
(weekday(time)>1 and weekday(time)<5) or
(weekday(time)=5 and hour(time)<23) or
(weekday(time)=5 and hour(time)=23 and minute(time)<36) )
Daily one as well
between 06:30 mon to fri 23:35 on each of five days a week”
Use the example I already gave - change the hour tests from 0 to 5.
Or even 06:30 mon to tues 04:00
( (weekday(time)=1 and hour(time)=6 and minute(time)>29) or
(weekday(time)=1 and hour(time)>6) or
(weekday(time)=2 and hour(time)<4) or
(weekday(time)=2 and hour(time)=4 and minute(time)=0) )