Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Lower priority notifacations - Time of day

I have been looking for a way to use a mailer object that will look for some sort of a time function. I have one already setup that sends all Priority 9's immediately.. This works great.
 
However I now want to be able to set up some sort of scheduler, so that after 2100hrs and before 0559, I only get Priority 9's, and between 0600 and 2059hrs, I get every alarm. It there a way to set this qualifier in the "SEND" line of the current mailer?? Would it be better to setup another mailer with some other qualifier in the "SEND" line?? Or do I need to set it up with the TIMEOFDAY or TIMEOFHOUR or some other TIMEOFxxxx timer?
I understand these TIMEOFxxxx timers may work, but don't know exatly what info to put in the fileds.
 
 
Not being too familiar with lookout, the more detailed you can get, would be greatly appreciated!
 
 
 
Thanks!!
 
Rod Ekholm
Spokane County Communications Dept.
 
0 Kudos
Message 1 of 14
(6,804 Views)

Anyone have any ideas?? Lower Priority mailer based on time of day???

 

 

 

Thanks

0 Kudos
Message 2 of 14
(6,753 Views)
create an expression object. 
EXP = (\..\$System.time-int(\..\$System.time))*24
EXP is the hour of the day.
Then, Mailer.send = $Alarm.update and ((EXP<21 and EXP>=6) or $Alarm.priority>=9)
 
Ryan Shi
National Instruments
0 Kudos
Message 3 of 14
(6,744 Views)
Thanks for the reply Ryan!! Does this info all go in the Expression box? Or does the second part.. $Alarm.update... go into the Mailer's "SEND" box?
0 Kudos
Message 4 of 14
(6,742 Views)
EXP is the object (expression).  It will be updating and then we can use it.
 
The second expression is for the "SEND" box of Mailer object.  I tested and the logic is correct.
Ryan Shi
National Instruments
0 Kudos
Message 5 of 14
(6,739 Views)

I had to put it in as $Alarm.update and "((EXP<21 and EXP>=6) or $Alarm.priority>=9)" with the quotes to make it accept it in the Mailer object. Also.. In the Expression, I had to put quotes around the "EXP" for it to be accepted. Is this correct?

 

 

0 Kudos
Message 6 of 14
(6,728 Views)
I see that we can't create expression object named "EXP". So, create the expression named "Exp1". See the attached pic. You don't need the quotes. Mailer object should accept it.
If you use quotes, it will be a string, instead of expression.
Ryan Shi
National Instruments
0 Kudos
Message 7 of 14
(6,714 Views)
Ryan - I appreciate your patience, knowledge and experience!!! I am still not able to create it for some reason. I go to INSERT > EXPRESSION > then Enter in the expression just as it is in you example picture. But now it comes up with:
Error: The object is not defined: $Alarm
 
Attached is the screenshot of the error for the Create expression try.
 
So I thought i had to create it in the mailer first, but it gave me about the same error.. It is attached, too.
 
 
Download All
0 Kudos
Message 8 of 14
(6,702 Views)
The $alarm object should be defined. But maybe your current panel object is in the "Panels" folder,  when you insert expression on panel, it can't find $Alarm, because $Alarm is not in Panels folder. So, the path is a liitle different.
For your Mailder.gif, you need to create Exp1 object first, then mailer can find it.
 
Let's start from very begining.
1.  Object->create, select (expression).  By default, the "expression" name is Exp1.  Input the expression, like attached pic 1.  I don't mean to insert the expression, but create this object. If you just insert the expression, you just see the value on panel, you can't use this value in other objects. But if you create the object, it has the name, and you can use this expression's value somewhere else.
     \..\$System.time is the relative path from this expression object to the $System. If you get error that $System is not define,  maybe the path is incorrect. You can manually select the $System.time in "Expression Editor", like pic 2.
 
2. The Exp1 is created. It is the current hour of the day.
 
3. Create Mailer object. You got Exp1 is not defined, because you need to create Exp1 first. If you get $Alarm not defined, it means the path is incorrect. You need to manually select $Alarm.update in "Expression Editor". Then Lookout will build the path for you.


Message Edited by Ryan.S on 02-06-2008 10:31 PM
Ryan Shi
National Instruments
Download All
0 Kudos
Message 9 of 14
(6,679 Views)

Alright.. So I made it work. I had to Right-Click the process and NEW OBJECT.. then Expression. This gave me the correct item you were talking about. But.. It still didn't work until I took all of the "(())'s" out of the Mailer's SEND line. Once I did that.. It all worked like I was hoping it would.

So.. Is this going to be OK?? For me I think it will unless there is still something programatially that I am missing.

I appreciate your Lookout-101 for me!!

 

0 Kudos
Message 10 of 14
(6,670 Views)