Hi all,
i have situation since 5.1.2 or 5.1.3 which im actually using that all cron based ruletriggers seems no to work any more as i would expect it. im using OH in docker and updating since long time as a new version is announced.
here some logs - in the older log 7 you can see that sometimes it is working. in the actual log i cannot see an automatic run, only one by hand clicking
has someone with the newest oh same problems or an idea how i could make this better working again?
from my opinion the cron trigger were working correctly on older versions but i cannot tell from which version the problem startet.
I donât have any cron triggers in my system so Iâve not noticed anything like this.
If you use a time of day trigger does that fail too?
Have you noticed and missbehavior with timers?
Is it all cron triggers or just some of them?
There was recently a change to the docker images to fix a timezone issue but that would have changed when the rules run, not prevent them from running entirely. So iâm not sure what the problem could be here. I think the only thing we can do is to bound the problem as tightly as we can and file an issue on openhab-core.
Hi Rich,
thanks for reply. I have a lot of rules and so i checked some more with cron based triggers against the log. It seems that all of them were not run automaticly by the crontrigger.
im not really sure when this started, because 5.1.0 and all subversions until now 5.1.3 had not so much time between release and i had no time to analyze this in january/february. But from my guessings it coud be at least 5.1.2 and 3 that since then i have this issue.
i could file an issue but do you think i could get somehow more informations out of the system with some debugs to add too?
timers i dont use. and most rules are on change of items based but sometimes cronbased is needed
fixed time trigger: i set one to 17:31 and this did also not triggered
Hi Ricardo
docker is running on debian boookworm. but container should normally not impacted by host.
the host-system is used since some years and the problem appeared this year first. But the openhab container was updated as a new release was there
i dont know if inside container runtime cron is installed.Normally there is a minimized environment which is built in the container. and remember that the cron is not generally not run, because yesterday sometimes (not all) were triggered. the rule should trigger all 2 hours and 3 times i have seen it triggered
openHAB manages cron jobs internally through its own scheduler, not via the host operating systemâs cron service. When running openHAB in a Docker container, ensure the containerâs timezone is correctly set to match your local time, as incorrect timezone configuration is a common cause of cron rules not executing as expected.
To verify cron jobs are working:
Check the openhab.log and events.log files for scheduled rule triggers.
Use a simple test rule like:
rule "Test Cron"
when Time cron "0 0/1 * * * ?"
then
logInfo("CronTest", "Cron triggered at: " + now.toString())
end
Yes, I think filing an issue is the next step. I donât know what loggers would need to be set to DEBUG to gather more information but whom ever takes up the issue on GitHub should be able to tell you what additional information is needed and which loggers to change to get it.
The fact that time of day triggers also fail points to a more pervasive problem than just cron. A timer test would be helpful too.
In the mean time, until this can get fixed, you might consider using some timers in place of the cron triggers, assuming timers work where cron does not. You are using JS so OHRT (Install openHAB Rules Tools [5.0.0.0;5.9.9.9]) could make this easier.
You could also set up a cron job on your host that uses curl to trigger these rules.
This does need to get fixed but you need the rules to work until it is.
just a thought have you checked the time on the openHAB system is what you expect it to be because there was an issue where the timezone changed from what it was originally configured.
That would only cause your cron rules not to run at the expected time though, but worth checking.
0 0/5 * * * ? * should have about 12 entries in log per hour from each trigger
0 0 0/2 * * ? * should have about 12 entries in log per day from each trigger
if less entries or zero entries then its not expected. The time is checked and correct.
The thing is, for that kind of rhythms the timezone doesnt matter. The maximal impact would be that on twohour rhythm the trigger would be on the odd hours. But thats not the problem.
But thanks that this was not clear enough described and so i added this to the github issue too
about 1100 updates per minute from mqtt-thing - so as i now have seen that and fixed that yust now i could imagine, that this storm of messages had possibly a loadimpact. this could possibly cause that this makes it impossible to trigger the crons.
The events on mqtt were much less, but config of mqtt-device triggered the storm.
i will have a look at this and will let you know next days about (if this will stabilize the cron triggers, then i will update also the github issue too)
Check your Channel configs for the âIs Commandâ option (youâll have to check âAdvanced Optionsâ). This option should never be enabled on a Channel that has both a stateTopic and a commandTopic or else you can end up in an infinite loop.
This property should only be enabled when the Channel only has a stateTopic and and message on that topic should be sent to the OH Item as a command instead of an update.
Hi Rich
Thank you and all for help. i closed this now and the github issue too (i commented the reason for documentation).
The triggers were working stable again since correcting the configuration of the mqtt-devices which i have seen in the logfiles which impacted the eventstorm.