Scheduling of Router Commands
Problem
You want to issue a command for the router to execute at regularly scheduled times.
Solution
Use the router’s Kron facility to execute commands at regularly scheduled intervals:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#kron policy-listOREILLYRouter(config-kron-policy)#cliwrite memoryRouter(config-kron-policy)#exitRouter(config)#kron occurrenceDAILYat5at17:00recurringRouter(config-kron-occurrence)#policy-listOREILLYRouter(config-kron-occurrence)#endRouter#
Cisco first introduced the Kron facility in IOS Version 12.3(1).
Warning
It is highly recommended that you configure the router with an accurate time source such as NTP or SNTP before configuring the Kron facilities, as it requires an accurate clock to work correctly. See Chapter 14 for more information on NTP and SNTP.
Discussion
The Cisco Kron facility is similar to the Unix Cron facility in that it allows you to schedule commands to be executed at regular intervals. In essence, it allows you to automate certain administrative functions that the router administrator would otherwise have to perform manually. Of course the major advantage is that once configured correctly, the Kron facility issues the commands at the exact time required and without the chance of typos. In addition, it does not require the administrator be present when the commands are run, which is important, especially in organizations with large numbers of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access