Hi all,
this morning at 04:30 all my time cron rules stopped working without any report in the logs. Also there’s nothing to see in the syslog.
One rule is executed every minute and it was last executed at 04:29:
rule "ExecCal"
when
Time cron "0 0/1 * * * ?"
then
logInfo("ExecCal", "Start")
do my calendar stuff
logInfo("ExecCal", "End")
end
2017-08-05 04:32:00.279 [INFO ] [Manager$ExpressionThreadPoolExecutor] - Expression '0 32 4 5 8 ? 2017' has no future executions anymore
Don’t know what these entries which I am seeing since some weeks are caused by, but they are definitley not coming from any of my rules.
But the main question is: how can I find out what went wrong and stopped my rules, cause not only the rule shown above stopped working but also all other time cron rules I have.
I copied all my rules to a test machine and found out that the copied also stop working but not half as often. There is no z-wave traffic on my trst machine. I am still working on removing all my specific stuff from the copied rules in order to post them.
Meanwhile I also found out that while I was heavily increasing http traffic within my original rules, time between two breakdowns was decreasing. The next thing I wanna do is to remove http binding and put all this stuff into shell scripts that can be called by exec binding. Maybe this helps identifying the problem.
I know, that this is an old thread but it seems related.
However, the symptoms are exactly the same:
no visible error message neither in events.log nor openhab.log
No changes when it happened for hours.
I actually use a rule to detect this issue:
// Check whether the cron rules are working properly
rule "Does cron work?"
when
Item Astro_Sun_Azimuth changed
then
if(!System_started.changedSince(now.minusMinutes(45),"jdbc")) {
if(ActTime.state != NULL && ActTime.previousState(true,"jdbc").state != NULL && !ActTime.changedSince(now.minusMinutes(60),"jdbc")) {
logInfo("system.rules", "ActTime (" + ActTime.state + ") did not change since 60 min - is there a cron Problem?")
sendTelegram("OH_TeleBot", "ActTime seit 60 min nicht aktualisiert: " + ActTime.state.toString + "\nCron Probleme?")
}
}
end
I am running OH 2.4 stable on a raspberry PI
EDIT: For some issues I sometimes restart single OH modules from karaf instead of the entire OH system. Did you maybe found out, which one needs to be restarted (any Core module like “Eclipse SmartHome Model Core” or such)?
I run a rule every minute and don’t have this issue anymore since I updated to OH 2.4 stable.
BTW: Together with The OH update I stabilized my rpi by enabling its watchdog and moving the system onto a ssd (instead of sd-card). Maybe this helped.
Thanks.
I currently try to reduce the executeCommand lines with a timeout which supposed to be causing timing problems leading to the cron issue.
I hope this will help…