cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2801
Views
11
Helpful
3
Replies

EEM cron timer running at hh:00 minute

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.

2 Accepted Solutions

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

Look at the syntax to use for cron.  - should be good "3,18,33,48"

 

 

 

https://crontab.guru/

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

Seb Rupik
VIP Alumni
VIP Alumni

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.

View solution in original post

3 Replies 3

balaji.bandi
Hall of Fame
Hall of Fame

Look at the syntax to use for cron.  - should be good "3,18,33,48"

 

 

 

https://crontab.guru/

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Seb Rupik
VIP Alumni
VIP Alumni

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.

Thank you both for the answers, I will amend my cron line.