danst
(Daniel)
1
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
lfs_alp5
(Alpoy)
2
Try:
Time cron "0 */15 * * * ?"
rossko57
(Rossko57)
3
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.
danst
(Daniel)
4
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
rossko57
(Rossko57)
5
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
danst
(Daniel)
6
I had two rules with the same name. I didn’t know that they needed to be unique. Thanks so much!
rossko57
(Rossko57)
7
Not obvious, but it is in the docs. However, I think we all learn that one the hard way.
All working as expected now?