03-03-2022 11:01 AM
Hello Expert
I tried run the following Kron but I am unsuccessful .
kron policy-list restart-interface
cli enable
cli config t
cli int FastEthernet0/1
cli shutdown
kron occurrence restart-interface at 10:45 recurring
i humbly request some guidance to run same successfully.
Regards
Solved! Go to Solution.
03-03-2022 11:44 AM
kron policy-list restart-interface
cli enable
cli config t
cli int FastEthernet0/1
cli shutdown
exit
below runs at 10:45
kron occurrence restart-interface at 10:45 recurring
policy-list restart-interface
03-04-2022 10:06 AM
At 10:45 it runs every day
here is a good explanation :
https://crontab.guru/#45_10_*_*_*
every 2 hours as below :
https://crontab.guru/every-2-hours
03-03-2022 11:03 AM
kron occurrence restart-interface at 10:45 recurring
not sure we understand this, Do you want @10:45am shutdown and no shutdown interface fas 0/1 ?
03-03-2022 11:30 AM
hello Balaji,
The restart-inferface is just the name I should have use a different name.
I just need to shutdown the interface at 10.45 am this exercise is just a test .
Regards
I
03-03-2022 11:44 AM
kron policy-list restart-interface
cli enable
cli config t
cli int FastEthernet0/1
cli shutdown
exit
below runs at 10:45
kron occurrence restart-interface at 10:45 recurring
policy-list restart-interface
03-04-2022 07:12 AM
Good Day,
I tried as per your suggestion but nothing happened
Unsure what a am doing wrong?
kron occurrence restart-interface at 10:45 recurring
policy-list restart-interface
!
kron policy-list restart-interface
cli enable
cli config t
cli int FastEthernet0/1
cli shutdown
Thank you
03-04-2022 07:48 AM
Do you still have an issue ? kron runs @104am
03-04-2022 08:00 AM
Hello Balaji,
The kron did not run the interface is still up.
Regards
03-04-2022 08:47 AM - edited 03-04-2022 08:50 AM
Looks there is Limitation in kron, its not excuting what expected, instead you can use EEM as below :
event manager applet shut-interface
event timer cron name shutdown-interface-schedule cron-entry "45 10 * * *"
action 01.0 cli command "enable"
action 02.0 cli command "config t"
action 03.0 cli command "interface FastEthernet0/1"
action 04.0 cli command "shutdown"
action 05.0 syslog msg "Interfeace FastEthernet0/1 has been shutdown by EEM applet"
end
Tested and working as below in my LAB (just used time 16:46)
03-04-2022 09:16 AM
Hello
I will try the new method but I am trying to understand the event time line
event timer cron name shutdown-interface-schedule cron-entry "45 10 * * *"
for example if you need an event to happen ever 60 minutes (1 hr) how do amend the event timer line to do so.
Regards
03-04-2022 09:39 AM - edited 03-04-2022 09:51 AM
Hello Expert,
The event manager work perfect.
I am trying to understand the event time line
event timer cron name shutdown-interface-schedule cron-entry "45 10 * * *"
Could you please modify the event manager to restart the interface very 120 minutes (2 hrs).
Regards
03-04-2022 10:06 AM
At 10:45 it runs every day
here is a good explanation :
https://crontab.guru/#45_10_*_*_*
every 2 hours as below :
https://crontab.guru/every-2-hours
03-04-2022 10:29 AM
Hello Bal,
Thank you for all the assistance.
Regards
07-22-2022 08:12 PM
dude i had to sign in just to thumbs up your post if I could give you 100 thumbs up I would thanks a million!
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