Time Based Event Processing
-
Hi,
Is there a way to configure an event processing to behave differently based on the time?
Besides the normal alarms we have, I was trying to setup new ones that should trigger only during the night for example, when there is nobody to check email/sms messages. So basically I wanted to add a new event processing policy, for a particular event, but it should only trigger if the event is raised between 00 and 8 am for example.
I hope this can be done through the filtering script, but I was not able to find how to do that.Thank you,
Alex -
Hi,
yes, this can be done with filtering script. You can get "time" object with gmtime or localtime functions and then check it's properties. To match events only between 00:00 and 08:00 you can use the following script:
t = localtime($event->timestamp); return t->hour >= 0 and t->hour < 8;This will not include 8:00, if you need it you should add additional condition that checks for 8:00 exact time.
Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login