Kron PDF
Kron PDF
The clock time must be set on the routing device before a Command Scheduler occurrence is scheduled to
run. If the clock time is not set, a warning message will appear on the console screen after the kron occurrence
command has been entered. Use the clock command or Network Time Protocol (NTP) to set the clock time.
The EXEC CLI to be run by Command Scheduler must be tested on the routing device to determine if it will
run without generating a prompt or allowing execution interruption by keystrokes. Initial testing is important
because Command Scheduler will delete the entire policy list if any CLI syntax fails. Removing the policy
list ensures that any CLI dependencies will not generate more errors.
If you use the conditional keyword with the kron policy-list command, execution of the commands will stop
when an error is encountered.
Note • No more than 31 policy lists can be scheduled to run at the same time.
• If a one-time occurrence is scheduled, the occurrence will not be displayed by the show
running-config command after the occurrence has run.
>
SUMMARY STEPS
1. enable
2. configure terminal
3. kron policy-list list-name [conditional]
4. cli command
5. exit
6. kron occurrence occurrence-name [user username] {in[[numdays:]numhours:]nummin| at
hours:min[[month] day-of-month] [day-of-week]} {oneshot| recurring| system-startup}
7. policy-list list-name
8. exit
9. show kron schedule
DETAILED STEPS
Example:
Device# configure terminal
Step 4 cli command Specifies the fully-qualified EXEC command and associated syntax to be
added as an entry in the specified Command Scheduler policy list.
Example: • Each entry is added to the policy list in the order in which it is
Device(config-kron-policy)# cli cns configured.
image retrieve server
https://10.19.2.3/cnsweek/ status • Repeat this step to add other EXEC CLI commands to a policy list
https://10.19.2.3/cnsstatus/week/ to be executed at the same time or interval.
Step 6 kron occurrence occurrence-name [user Specifies a name and schedule for a new or existing Command Scheduler
username] occurrence and enters kron-occurrence configuration mode.
{in[[numdays:]numhours:]nummin| at
hours:min[[month] day-of-month] • Use the in keyword to specify a delta time interval with a timer that
starts when this command is configured.
[day-of-week]} {oneshot| recurring|
system-startup} • Use the at keyword to specify a calendar date and time.
• Choose either the oneshot or recurring keyword to schedule
Example:
Command Scheduler occurrence once or repeatedly. Add the optional
Device(config)# kron occurrence may system-startup keyword for the occurrence to be at system startup.
user sales at 6:30 may 20 oneshot
Step 9 show kron schedule (Optional) Displays the status and schedule information of Command
Scheduler occurrences.
Example:
Device# show kron schedule
Examples
In the following example, output information is displayed about the status and schedule of all configured
Command Scheduler occurrences:
Troubleshooting Tips
Use the debug kron command in privileged EXEC mode to troubleshoot Command Scheduler command
operations. Use any debugging command with caution because the volume of output generated can slow or
stop the device's operations.
In the following example, a Command Scheduler policy named sales-may is configured to run a Cisco
Networking Services command to retrieve a specified image from a remote server. The policy is then scheduled
to run only once on May 20, at 6:30 a.m.
Additional References
Related Documents
Cisco Networking Services commands: complete command syntax, Cisco IOS Cisco Networking
command mode, command history, defaults, usage guidelines, and Services Command Reference
examples.
Standard/RFC Title
No new or modified standards/RFCs are supported --
by this feature, and support for existing
standards/RFCs has not been modified by this feature.
MIBs
Technical Assistance
Description Link
The Cisco Support and Documentation website http://www.cisco.com/cisco/web/support/index.html
provides online resources to download documentation,
software, and tools. Use these resources to install and
configure the software and to troubleshoot and resolve
technical issues with Cisco products and technologies.
Access to most tools on the Cisco Support and
Documentation website requires a Cisco.com user ID
and password.
12.4(15)T