cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

Auto Reload Router on a weekly basis using KRON scheduler.

6067
Views
15
Helpful
2
Comments

Command Scheduler

The Command Scheduler (KRON) Policy for System Startup feature enables support for the Command Scheduler upon system startup.

The Command Scheduler allows customers to schedule fully-qualified EXEC mode CLI commands to run once, at specified intervals, at specified calendar dates and times, or upon system startup. Originally designed to work with Cisco Networking Services commands, Command Scheduler now has a broader application. Using the Cisco Networking Services image agent feature, remote devices residing outside a firewall or using Network Address Translation (NAT) addresses can use Command Scheduler to launch CLI at intervals, to update the image running in the device.

Command Scheduler has two basic processes. A policy list is configured containing lines of fully-qualified EXEC CLI commands to be run at the same time or same interval. One or more policy lists are then scheduled to run after a specified interval of time, at a specified calendar date and time, or upon system startup. Each scheduled occurrence can be set to run either once only or on a recurring basis.

How to Configure Command Scheduler (Kron) Here i explain how to reload your router every week on certain time.

First, create a kron policy list. Essentially, this policy list serves as your "script," which lists what you want the router to run at a scheduled time. Here's an example:

 

Go to global config mode

Config terminal

Router (config)# kron policy-list reload-weekly

 

Router(config-kron-policy)# cli reload ==è This “reload” what cli command you would like to execute here we are doing reload

 

Router (config-kron-policy)# exit

Next, create a kron occurrence, in which you tell the router when and how often you want to run this policy list (i.e., group of commands). Here's an example:

Router (config)# kron occurrence reload-weekly at 07:00 Mon recurring ==è Specify the date and day (if you want to do it on recurring type recurring)

 

Router(config-kron-occurrence)# policy-list reload-weekly

 

Router# show kron schedule

Kron Occurrence Schedule

Reload-weekly inactive, will run again in 6 days 10:52:57 at 7 :00 on Mon

 

By doing above configuration, you router will reload every “Monday” at 7:00 AM . You can play around with many things like saving configuration , remove files etc according to your need.

 

 

Make sure you write the configuration.

 

http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-122-mainline/46741-backup-config.html#req

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/cns/configuration/xe-3s/asr1000/cns-xe-3s-asr1000-book/cns-cmd-sched.html#GUID-4D370148-CCCD-4668-A98E-3E719F53DA60

 Br,

Nadeem Ahmed.

Please rate if you find this useful.

Comments
Advisor

good DOC  for maintenance purpose.[+5]

 

regds,

aman

Beginner

Hi Nadeem,

Can you please help me with the command to get output for multiple show commands in a single text file like show vlan brief, show interface trunk, show ip eigrp neighbor and so on. Thanks.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here