04-18-2021 10:04 PM
Hi People,
Recently I have been testing a custom EEM script which runs every 15minutes and checks some CLI output and does some action.
I have a cron timer set using the following line:
event timer cron cron-entry "3,18,33,48, * * * *"
To my knowledge this is only supposed to run at those specified minutes of the hour (3, 18, 33, 48) but it is also running at minute 0 of every hour.
E.g. with the script:
event manager applet TEST_NAME authorization bypass
event timer cron cron-entry "3,18,33,48, * * * *"
action 10 cli command "enable"
---some actions---
I am seeing in my logs the following:
*Apr 12 16:00:00: %HA_EM-6-LOG: TEST_NAME : DEBUG(cli_lib) : : CTL : cli_open called.
*Apr 12 16:00:00: %HA_EM-6-LOG: TEST_NAME : DEBUG(cli_lib) : : OUT : Router>
*Apr 12 16:00:00: %HA_EM-6-LOG: TEST_NAME : DEBUG(cli_lib) : : IN : Router>enable
...
Is this expected behaviour for the EEM to run at minute 0? Can I prevent this from happening?
Thanks in advance.
Solved! Go to Solution.
04-18-2021 11:45 PM - edited 04-19-2021 04:24 AM
Look at the syntax to use for cron. - should be good "3,18,33,48"
04-19-2021 02:16 AM
Hi there,
Remove the final comma from your minute value list. I assume IOS is assuming there is another value, and in its absence using a zero. The cron timer should be:
event timer cron cron-entry "3,18,33,48 * * * *"
cheers,
Seb.
04-18-2021 11:45 PM - edited 04-19-2021 04:24 AM
Look at the syntax to use for cron. - should be good "3,18,33,48"
04-19-2021 02:16 AM
Hi there,
Remove the final comma from your minute value list. I assume IOS is assuming there is another value, and in its absence using a zero. The cron timer should be:
event timer cron cron-entry "3,18,33,48 * * * *"
cheers,
Seb.
04-19-2021 02:11 PM
Thank you both for the answers, I will amend my cron line.
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