<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Email alert time specific]]></title><description><![CDATA[<p dir="auto">Hi guys</p>
<p dir="auto">I am struggling to get 24/7 and 0800-1800 m-f alerts on different devices.<br />
Currently i have them container based, so i can just say "anything in 24/7 container just alert" and stop event processing</p>
<p dir="auto">The problem comes with the weekday alerts<br />
i have tried to find details in the forums and found weekdays and the times, my issue is how do i add BOTH of these!</p>
<p dir="auto">my example i have mushed together is -</p>
<pre><code>sub main()
{
now = localtime();
return (now-&gt;hour &gt;= 8) &amp;&amp; (now-&gt;hour &lt; 18);
t = localtime();
return (t-&gt;wday &gt;= 1) &amp;&amp; (t-&gt;wday &lt;= 5);

}
</code></pre>
<p dir="auto">Basically this will only send an alert for issues between 0800- 1800 Monday to Friday..<br />
My next problem will be to create alarms if they are still down come 0800!<br />
I have also created an event which will raise and alarm and not email, as i was finding the device offline but no alarm in the object..</p>
<p dir="auto">I really am struggling to validate if the rules work, i changed to sat/sun, to test and changed the time, but they both need to be true..</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.netxms.org/topic/7280/email-alert-time-specific</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:58:29 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7280.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Jan 2022 17:24:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Email alert time specific on Mon, 31 Jan 2022 12:43:05 GMT]]></title><description><![CDATA[<p dir="auto">I think i have it down with this filtering script on the alerts</p>
<pre><code>sub main()
{
now = localtime();
return (now-&gt;hour &gt;= 8) &amp;&amp; (now-&gt;hour &lt; 18) &amp;&amp; (now-&gt;wday &gt;= 1) &amp;&amp; (now-&gt;wday &lt;= 5);
}
</code></pre>
<p dir="auto">If you use scheduled maintenance plans it will also do a similar thing, but i still wanted to note when it had gone down, and send those notes (or read them) when we got it.</p>
<p dir="auto">So i have a EPP that just sayd "notify when down - no alerts, and that adds a custom entry for the exact time it went down)<br />
I'll figure out how to run a task to alert on all down systems at 0800 that grabs that data from the custom field another time!<br />
For now, i just dont want our  9-5 customers being charged for 24/7 work!</p>
]]></description><link>https://forum.netxms.org/post/30960</link><guid isPermaLink="true">https://forum.netxms.org/post/30960</guid><dc:creator><![CDATA[mjk]]></dc:creator><pubDate>Mon, 31 Jan 2022 12:43:05 GMT</pubDate></item></channel></rss>