04-19-2010 05:57 PM - edited 03-06-2019 10:41 AM
I have a need to shutdown, wait 30 seconds and issue a no shutdown on a router interface daily at 12am. Is there something that I can automate using Cisco IOS. Please keep in mind that I have no programing or scripting experience. Thanks in advance.
conf t
!
interface s6/1/1
shutdown (wait 30 seconds)
no shutdown
!
04-20-2010 09:13 AM
Hi,
If your IOS support, you can use EEM to do that.
An example of shutdown interface fa0/0 @ 12:00 and bring it back @ 12:01
event manager applet TEST
event timer cron name TEST cron-entry "0 12 * * *"
action 1 cli command "enable"
action 2 cli command "configure terminal"
action 3 cli command "interface fa0/0"
action 4 cli command "shutdown"
event manager applet TEST1
event timer cron name TEST1 cron-entry "1 12 * * *"
action 1 cli command "enable"
action 2 cli command "configure terminal"
action 3 cli command "interface fa0/0"
action 4 cli command "no shutdown"
HTH,
Lei Tian
04-20-2010 02:28 PM
Lei,
Thank you. That was very helpful. I have two questions:
1. I'm trying to interpet this line "event timer cron name TEST cron-entry "0 12 * * *" but I don't understand how you got it?
2. Is there a "Dummies Guide to EEM" that you can point me in the right direction? I want to learn how to fish.
04-20-2010 04:29 PM
Hi,
Cron is the UNIX scheduler, just search on google you will find the syntax and many examples.
For EEM configuration examples, you can search on cisco.com . Here is one of the configuration example:
HTH,
Lei Tian
03-09-2016 11:32 AM
Dear Lei,
I need your support for this below line
event timer cron name TEST1 cron-entry "1 12 * * *"
I need to shutdown my interface APRIL 01-2016 10.1 AM how we can write the script
Regards
Raf
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