cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1755
Views
0
Helpful
1
Replies

Having trouble using EEM and TCL 'after' command

oren.hecht
Level 1
Level 1

Hi,

I am using EEM to trigger the following commands on a set event:

action 1 cli command "enable"

action 2 cli command "tclsh flash:mytcl.tcl"

In my tcl script I am using the command 'after' to sleep for a specific time.

What I notice is that the script doesn't work consistently. Say I want to wait for 10 iterations and in each iteration sleep, sometimes it only does the first iteration, sometimes 2 and sometime 3 (3 was the max I got).

When I run the script via cli

R1#tclsh flash:mytcl.tcl

It works fine every time.

When I removed the 'after' command it completed the iterations fine.

Is there a different command I can use?

I am running this on a 7200 with  IOS 12.4(20)T.

Thanks,

Oren.

1 Reply 1

oren.hecht
Level 1
Level 1

After translating my script to proper EEM and having the same issue, I found out it was due to the maxrun setting that defaults to 20 seconds.

I configured it to be more, and it all works now.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: