Cisco Support Community
Community Member

kron with "cli ping"


I try to use ping in a kron policy to keep a VPN tunnel up:


kron policy-list ICMP
cli ping 192.168.x.y
kron occurrence PING in 10 recurring
policy-list ICMP


The command works fine - but after it´s done, the policy list is deleted(removed)!

"debug kron all" shows the following:

001745: Jan  8 17:35:26.738: Major 1, Minor 0
001746: Jan  8 17:35:26.738: Timer Event PING
001747: Jan  8 17:35:26.738: Kron delay for next PING 600000
001748: Jan  8 17:35:26.738: Call parse_cmd 'ping 192.168.x.y'
001749: Jan  8 17:35:26.870: Kron CLI return 0
**CLI 'ping 192.168.x.y':
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.x.y, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 24/26/28 ms'
001750: Jan  8 17:35:26.870: Major 4, Minor 7
001751: Jan  8 17:35:26.870: Respond to end of CLI Process
001752: Jan  8 17:35:26.870: Forcing Removing Policy ICMP
001753: Jan  8 17:35:26.870: Removing Policy ICMP
001754: Jan  8 17:35:26.870:     Removing CLI 'ping 192.168.x.y'
001755: Jan  8 17:35:26.870: Done Removing Policy ICMP

Okay, the documentation says:

Restrictions for Command Scheduler

The EXEC CLI specified in a Command Scheduler policy list must not generate a prompt or have the ability to be terminated using keystrokes. Command Scheduler is designed as a fully automated facility and no manual intervention is permitted.

But I can´t see where "ping 192.168.x.y" generates a prompt...   Well, maybe it could be "terminated using keystrokes"

Any ideas how I can get this to work?



Community Member

kron with "cli ping"

I was looking into the same command and I was facing the same problem. Apparently, the ping command is classified under the category "terminated using keystroke".

I found the solution in the new RTR command and it serves the purpose well. Below is what I'm using:

rtr 1
type echo protocol ipIcmpEcho source-ipaddr
timeout 200
frequency 300
rtr schedule 1 start-time now

I hope this will help other people who are stuck with the kron command.


Community Member

kron with "cli ping"

I have the same issue running the command :

'sh run | redirect ftp://X.X.X.X/VG/router_running.cfg'

It work fine on all except a few routers so I know it is not the above rule that should be affecting it.

Is this a bug as I can run the command manually awith no issue and no input.

CreatePlease to create content