cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
38127
Views
5
Helpful
4
Replies

Shut and No Shut Router Interface at Midnight

davidhuynh5
Level 1
Level 1

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

!

4 Replies 4

Lei Tian
Cisco Employee
Cisco Employee

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

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.

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:

    

     http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps6815/config_guide_eem_configuration_for_cisco_integrated_services_router_platforms.html

HTH,

Lei Tian

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

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:

Review Cisco Networking products for a $25 gift card