cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2651
Views
4
Helpful
2
Replies

Unable to Wait 30 Seconds and then Call TCL Script as Action?

tbonfigli
Level 1
Level 1

Hello and Good Afternoon All!

     I have been looking around the different threads and doing some research and I am unable to get my applet to wait for 30 seconds and then call a TCL script from an "action" statement.  Here is the basic script I am trying to execute:

event manager applet track-loopback1
event track 10 state down
action 1.0 cli command "enable"
action 1.1 cli command "config t"
action 1.3 cli command "event manager applet countdown-timer"
action 1.4 cli command "event timer countdown time 30"
action 1.5 cli command "action 1.0 wait 30"
action 1.6 cli command "end"
action 1.7 cli command "tclsh Loopback1-Notification.tcl"

The goal of this applet is to simply wait for the Loopback1 interface to go down, then spin up the applet "countdown-timer" which will wait for 60 seconds before ultimately calling my TCL script.  The reason for the "countdown time 30" and the "action 1.0 wait 30" is my (lack of? :-) ) understanding that after the countdown time 30 I need an action statement - but I am not 100% clear on this?  Ironically, it does, in fact, call the TCL script, it just does not wait the 30 seconds.  My current workaround is to just throw an "after 30000" statement in the TCL script, but I am really curious as to why this isn't working as expected (well, as I expected it to work anyway!).  Any assistance would be GREATLY appreciated.  Thank you so much!

Cheers,

Travis

2 Accepted Solutions

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

See my response to https://supportforums.cisco.com/discussion/13009231/eem-applet-wont-fire-tcl-script-after-countdown-expires .  What you are doing won't work, plus you shouldn't be calling tclsh from EEM anyway.

View solution in original post

pgasparovic
Level 1
Level 1

Hi Travis,

thanks for your post although I have been searching for some timing way and am just happy I see something I need for my proceedding - an "action wait". Cause yesterday I invested whole day in EEM study, a dry preparation of applet(s) and per command references there was no "action wait" command, neither in EEM nor Master sources. So I submitted feedback today. Great this exists and works, as I have checked directly in the IOS..

Regarding your question, judging from what Joe comment in referenced case, I think you should be able to do it right-away in single applet without configuring and firing TCL script. On track going down, just wait 30 seconds and launch the notification. Just don't know of exact design of that script..

Regards

Peter

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

See my response to https://supportforums.cisco.com/discussion/13009231/eem-applet-wont-fire-tcl-script-after-countdown-expires .  What you are doing won't work, plus you shouldn't be calling tclsh from EEM anyway.

pgasparovic
Level 1
Level 1

Hi Travis,

thanks for your post although I have been searching for some timing way and am just happy I see something I need for my proceedding - an "action wait". Cause yesterday I invested whole day in EEM study, a dry preparation of applet(s) and per command references there was no "action wait" command, neither in EEM nor Master sources. So I submitted feedback today. Great this exists and works, as I have checked directly in the IOS..

Regarding your question, judging from what Joe comment in referenced case, I think you should be able to do it right-away in single applet without configuring and firing TCL script. On track going down, just wait 30 seconds and launch the notification. Just don't know of exact design of that script..

Regards

Peter

Review Cisco Networking for a $25 gift card