Rule executed too often

Hi,

I would like to execute my rule every 15 Minutes. What am I doing wrong? The cron line is from the Cronmaker link in the rule documentation.

rule "Beschattung im Sommer"
when
    Item Azimut changed or
    Time cron "0 0/15 * 1/1 * ? *" //10
then

However, my log entries appear every minute…

2020-04-30 07:37:10.001 [INFO ] [e.smarthome.model.script.sonne.rules] - Azimut Temp zu gering hoch
2020-04-30 07:37:10.002 [INFO ] [e.smarthome.model.script.sonne.rules] - Azimut Sonne steht zu tief
2020-04-30 07:37:10.002 [INFO ] [e.smarthome.model.script.sonne.rules] - Azimut zu kalt draußen
2020-04-30 07:38:10.001 [INFO ] [e.smarthome.model.script.sonne.rules] - Azimut Temp zu gering hoch
2020-04-30 07:38:10.002 [INFO ] [e.smarthome.model.script.sonne.rules] - Azimut Sonne steht zu tief
2020-04-30 07:38:10.002 [INFO ] [e.smarthome.model.script.sonne.rules] - Azimut zu kalt draußen

Of course, the Azimut did not change in the meantime (this would produce another log entry)…

Thank you!
Daniel

Try:

Time cron "0 */15 * * * ?"

Are you sure?

Works for me, but I don’t have an Azimut Item.

rule "Beschattung im Sommer"
when
    Item Azimut changed or
    Time cron "0 0/15 * 1/1 * ? *" //10
then
    logInfo("test", "Ticktock")
end
2020-04-30 11:12:30.944 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'doors.rules'
2020-04-30 11:15:00.669 [INFO ] [.eclipse.smarthome.model.script.test] - Ticktock
2020-04-30 11:30:00.002 [INFO ] [.eclipse.smarthome.model.script.test] - Ticktock

Note that it’s not strictly every 15 minutes, it’s at 00 15 30 45 minutes past the hour.

Mm… interesting… I removed the azimuth.

rule "Beschattung im Sommer"
when
    Time cron "0 0/15 * 1/1 * ? *" //10
then
    logInfo("test", "Ticktock")
end

The result is not very promising.

2020-04-30 14:32:11.219 [INFO ] [.eclipse.smarthome.model.script.test] - Ticktock
2020-04-30 14:33:10.001 [INFO ] [.eclipse.smarthome.model.script.test] - Ticktock
2020-04-30 14:34:10.002 [INFO ] [.eclipse.smarthome.model.script.test] - Ticktock

Make sure you have only one rule named “Beschattung im Sommer” in any of your rules files.

Make sure your rules file loads without error after editing, as reported in openhab.log

That’s ten seconds late as well, that is curious.

I begin to suspect invisible characters in your cron line, surviving edits and copies.
Try adding a brand new rule

rule "Desperate test"
when
    Time cron "0 0/5 * 1/1 * ? *"
then
    logInfo("desperatetest", "BingBong")
end

I had two rules with the same name. I didn’t know that they needed to be unique. Thanks so much!

Not obvious, but it is in the docs. However, I think we all learn that one the hard way.

All working as expected now?

yes