I’m trying to create an alert that only sends if messages are received between 2:00PM and 6:30PM.
I’ve created this rule (some of my syntax might be incorrect, can ignore)
rule “function is_trading”
when
has_field(“timestamp”)
then
let msgTime = to_string($message.timestamp.hourOfDay) + “:” + to_string($message.timestamp.minuteOfHour)
set_field(“trading_hours”, to_string(“14:00” <= msgTime < “18:30”))
end
Any thoughts on how to accomplish this would be much appreciated.