09-30-2021 06:43 AM
I need to execute a command periodically, using EEM. To test it, I just want to turn off and interface periodically each 1 second. To do it, I did the following:
event manager applet BKP
event timer watchdog time 1000
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "int gig0/0"
action 4.0 cli command "shut"
action 5.0 cli command "end"
When I write it by console, it doesn't work. I have seen the name of the interface exists in the switch. What can I do?
Thanks
09-30-2021 09:31 AM
1 second is too Low, why you want to shutdown every 1 seconds, why not shutdown (instead of shutdown every 1 sec?) what is the use case.
what device is this ? what code running ? what you see the Logs ?
10-01-2021 03:48 AM
Hello,
the watchdog timer is in seconds. 1000 means 1000 seconds.
If you want to test if it works, better configure 'event none' and run the applet manually:
event manager applet BKP
event none
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "int gig0/0"
action 4.0 cli command "shut"
action 5.0 cli command "end"
Device#event manager run BKP
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