Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Shut and No Shut Router Interface at Midnight

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
Cisco Employee

Re: Shut and No Shut Router Interface at Midnight

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

New Member

Re: Shut and No Shut Router Interface at Midnight

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.

Cisco Employee

Re: Shut and No Shut Router Interface at Midnight

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

New Member

Dear Lei,

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

21519
Views
5
Helpful
4
Replies
CreatePlease to create content