cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
889
Views
10
Helpful
5
Replies

Event Manager Applet or Kron TCLSH not working??

Hi, I'm trying to shutdown an interface on a 3850, 

Ive followed the guides on this link https://learningnetwork.cisco.com/docs/DOC-24145 but they don't appear to be working?

 

Am I missing something?

 

I want to shut down GigabitEthernet2/0/20 at 04:00 and bring it up at 21:50

 

I set the time on the switch.

 

This is the first method I tried.

 

event manager applet shut
event timer cron name shut cron-entry "0 4 * * *"
action 1 cli command "configure terminal"
action 2 cli command "interface GigabitEthernet2/0/20"
action 3 cli command "shutdown"
event manager applet noshut
event timer cron name noshut cron-entry "50 21 * * *"
action 1 cli command "configure terminal"
action 2 cli command "interface GigabitEthernet2/0/20"
action 3 cli command "no shutdown"

 

This didn't seem to work, so I tried method 2 on the document:

 

Creating the files on the flash but replacing the line interface FastEthernet 0/0 with interface GigabitEthernet2/0/20

 

Example:

configure terminal

interface FastEthernet 0/0

shutdown

kron policy-list noshut

cli tclsh noshut

 

kron occurrence noshut at 21:50 recurring
policy-list noshut
!
kron occurrence shut at 4:30 recurring
policy-list shut
!
kron policy-list noshut
cli tclsh noshut
!
kron policy-list shut
cli tclsh shut

 

The Schedule is set as follows:

 

Core3850#sh kron schedule
Kron Occurrence Schedule
noshut inactive, will run again in 0 days 12:53:54 at 21:50 on
shut inactive, will run again in 0 days 19:33:54 at 4 :30 on

 

This didn't work either can anyone help me debug why? 

 

Many Thanks in advance!

 

Rob

1 Accepted Solution

Accepted Solutions

Hello,

 

in the first script, you are missing the 'enable" commands, add those and check if it works:

 

event manager applet shut
event timer cron name shut cron-entry "0 4 * * *"

action 1.0 cli command "enable"

action 1.1 cli command "configure terminal"
action 2 cli command "interface GigabitEthernet2/0/20"
action 3 cli command "shutdown"
event manager applet noshut
event timer cron name noshut cron-entry "50 21 * * *"

action 1.0 cli command "enable"

action 1.1 cli command "configure terminal"
action 2 cli command "interface GigabitEthernet2/0/20"
action 3 cli command "no shutdown"

View solution in original post

5 Replies 5

Hello,

 

in the first script, you are missing the 'enable" commands, add those and check if it works:

 

event manager applet shut
event timer cron name shut cron-entry "0 4 * * *"

action 1.0 cli command "enable"

action 1.1 cli command "configure terminal"
action 2 cli command "interface GigabitEthernet2/0/20"
action 3 cli command "shutdown"
event manager applet noshut
event timer cron name noshut cron-entry "50 21 * * *"

action 1.0 cli command "enable"

action 1.1 cli command "configure terminal"
action 2 cli command "interface GigabitEthernet2/0/20"
action 3 cli command "no shutdown"

Thank you Georg, 

The enable command would prompt for a password, would this need to be entered into the script too?

 

Cheers

Rob

Hello,

 

no, you don't need to add the password to the script...

Hello

The below would be applicable weekly Monday-friday


event manager applet shut
 event timer cron cron-entry "0 4 * * 1-5"
 action 1.0 cli command "enable"
 action 1.1 cli command "conf t"
 action 1.2 cli command "GigabitEthernet2/0/2"
 action 1.3 cli command "shut"
 action 1.4 cli command "end"



event manager applet noshut
 event timer cron cron-entry "50 21 * * 1-5"
 action 2.0 cli command "enable"
 action 2.1 cli command "conf t"
 action 2.2 cli command "GigabitEthernet2/0/2"
 action 2.3 cli command "no shut"
 action 2.4 cli command "end"

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thank you for those reply's.

 

I can confirm adding enable to the script has got it working for me. Should be obvious really but I missed it.

 

Thanks !

Rob

Review Cisco Networking products for a $25 gift card