Kron: poor-man's cron
When two groups within Cisco needed time-based command execution in Cisco IOS, they (in a typical big-corporation fashion) decided to implement the same wheel from two different sets of spokes and rims. One group built the Embedded Event Manager with its event timer cron command (introduced in 12.2(25)S and 12.3(14)T), the other group created the more limited kron command set (introduced in 12.3(1)).
EEM is almost a perfect superset of kron, both can trigger a set of CLI commands at reload, at periodic intervals or at certain time in the future. The only extra functionality offered by kron is the ability to specify a different username for each event (whereas all EEM applets have to run under a common username) … and kron is available in older IOS releases.
Similar to EEM applets, CLI commands executed within kron cannot expect extra input (so you cannot execute clear counters or reload from kron) and the output they generate is lost unless you use output filters to redirect it to an external file.
Here is a simple configuration that archives the router's running configuration every sunday half an hour before midnight:
kron policy-list archiveConfig
cli archive config
!
kron occurrence archiveConfig at 23:30 Sun recurring
policy-list archiveConfig
It looks like some tests will have to be done :)
event manager applet midnight
event timer cron name midnight cron-entry "@midnight"
action 1.0 cli command "enable"
action 2.0 cli command "tclsh flash:midnight.tcl"