
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
12-10-2015 09:18 PM - edited 03-12-2019 10:20 AM
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.
Br,
Nadeem Ahmed.
Please rate if you find this useful.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
good DOC for maintenance purpose.[+5]
regds,
aman
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
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.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi
how to disable or delete the cron jobs?
thanks for help
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi,
Your doc is very helpful.
But in my router, the kron script fails because it needs a confirmation for the reload command.
How can I reload without having the confirmation request ?
Regards.