TCL help

Unanswered Question
Jun 29th, 2010

I have written a TCL script that sends an email when a T1 in an MLP bundle goes inactive. The cron timer runs the script every 2 minutes.  The problem I have is that I don't want an email every two minutes until the circuit goes back to an active state.  I want to write some code that will check a time stamp of the last sent email so it will only send a new email every hour.  Very new to TCL and am still learning so any help is appreciated.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Joe Clarke Thu, 07/01/2010 - 13:19

Please post the code you currently have.

In the future, it is best to post these kind of questions under Network Infratructure > Network Management.  I will be more likely to see them.

oemoralesjr Thu, 07/01/2010 - 15:23

Incredible.  That works perfectly.  I know you are probably busy, but if you have time to break down what you did that would help me tremendously.  I am still learning so would love to understand the logic behind what you wrote.  For instance, if I want to change the time to wait to send another email, it looks like I would change the exp.  I believe the syntax is minutes * seconds.

Thanks again!

Joe Clarke Fri, 07/02/2010 - 22:50

I used a context to save the last time the email was sent.  Then, if the time is greater than an hour, send another email.  Yes, if you modify the expr you can adjust how often emails are sent.  If you want to make this more flexible, then you should consider changing the "60" in the expr to an EEM environment variable.

oemoralesjr Tue, 07/06/2010 - 09:38

Thanks for your help. I did make the "60" a EEM variable since we may play with the time to after a while. I just took out the expression and made the variable 3600. At any rate, I really appreciate your help.


This Discussion

Related Content