04-28-2023 07:13 AM
Hello,
I am trying to schedule the task of running the four ntp commands below, after the router (Cisco 887VA) has rebooted, using kron.
Here is my try:
router_887va(config)# kron policy-list kron_ntp
router_887va(config-kron-policy)# cli ntp server 0.pool.ntp.org
router_887va(config-kron-policy)# cli ntp server 1.pool.ntp.org
router_887va(config-kron-policy)# cli ntp server 2.pool.ntp.org
router_887va(config-kron-policy)# cli ntp server 3.pool.ntp.org
router_887va(config-kron-policy)# exit
To test this, I'll just wait for 1 minute:
router_887va(config)# kron occurrence kron_day in 0:0:1 recurring
router_887va(config-kron-occurrence)# policy-list kron_ntp
router_887va(config-kron-occurrence)# exi
Until now, I can see the countdown using the command "show kron schedule" but no "ntp server X.pool.ntp.org" lines get written to the running-config...
What am I doing wrong?
Best regards.
04-28-2023 07:19 AM
I dont know but I think you need to add system-startup after recurring <<-
04-28-2023 07:36 AM
Hi. Thank you.
Adding system-startup after recurring doesn't change anything.
Moreover, these commands should be run after we are absolutely sure the router has completely started up, I mean, not too soon...
Best regards.
04-28-2023 07:43 AM
OK you reboot, the router will load statup config and feed to running config
now runing config have Knor and apply after time you specify, if you not add it to startup the config will no load when router reboot!
or I am wrong ?
04-28-2023 08:17 AM - edited 04-28-2023 09:07 AM
Hi.
I currently have this in running-config and startup-config:
kron occurrence kron_occurrence_day in 1 recurring
policy-list kron_policy_ntp
!
kron policy-list kron_policy_ntp
cli ntp server 0.pool.ntp.org
I reloaded the router.
Below is what happens. It looks like the command is executed but in fact it is not.
router_887va# show ntp status
%NTP is not enabled.
router_887va# show kron schedule
Kron Occurrence Schedule
kron_occurrence_iode_day inactive, will run again in 0 days 00:00:08
router_887va# show kron schedule
Kron Occurrence Schedule
kron_occurrence_iode_day inactive, will run again in 0 days 00:00:04
router_887va# show kron schedule
Kron Occurrence Schedule
kron_occurrence_iode_day inactive, will run again in 0 days 00:00:02
router_887va# show kron schedule
Kron Occurrence Schedule
kron_occurrence_iode_day inactive, will run again in 0 days 00:00:01
router_887va# show kron schedule
Kron Occurrence Schedule
kron_occurrence_iode_day inactive, will run again in 0 days 00:00:00
router_887va# show kron schedule
Kron Occurrence Schedule
kron_occurrence_iode_day inactive, will run again in 0 days 00:00:58
router_887va# show ntp status
%NTP is not enabled.
Best regards.
04-28-2023 04:54 PM
Change NTP to SNTP.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide