I think your cron expression is fine. The 7th character is optional and your rule should be firing (and probably is) every second but you’re not seeing any output because your debug logging is not activated.
All you have to do is type the following into your console:
after the test yesterday and no modifications, today the rule will not be executed again.
It is not important to me, to use debug output. It was only a test.
I have change my rules file now in that way:
val String filename = "heizung.rules"
rule "heizungen"
when
Time cron "*/5 * * ? * * *"
then
logInfo("heizung.rules","starting...")
var String result = executeCommandLine("/usr/local/bin/checkMail.sh julia", 1000)
logInfo(filename,"result : "+ result)
if (result.startsWith("julia") ) {
logInfo(filename,"Julia Heizung gesetzt")
OGJULIA_HEIZUNG_SetTemp.postUpdate(7.0)
}
end
The script “/usr/local/bin/checkMail.sh” is readable by “openhab” user and gives only the “Name” back (“julia” in that test case). I have executed it with “sudo -u openhab /usr/local/bin/checkMail.sh julia” and it works like expected.
But, and this is the main problem, it wont be executed. I see in openhab.log only this entries after saving the rule file:
2018-01-24 08:03:44.003 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'heizung.rules'
It looks like, that something is wrong with the file it self.
If i rewrite the fle with the same content, it works now. Hopefully it works the next time too