06-29-2010 12:15 PM
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.
07-01-2010 01:19 PM
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.
07-01-2010 01:25 PM
07-01-2010 02:34 PM
07-01-2010 03:23 PM
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!
07-02-2010 10:50 PM
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.
07-06-2010 09:38 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide