Openhab2 cron trigger problems

Some of my Time cron do not seem to work anymore.
e.g.

cron “0 0/1 * 1/1 * ? *” should trigger every minute but does not work
cron “0 0/5 * * * ?” should trigger every 5 minutes is working
cron “0 1 1 * * ?” should trigger one minute past 1 o’clock is not working

Did anyone also expect different behavior?

Are you on version #594 or older?
Then this could solve your problem:

I am running build #595

I discovered a related issue.
I have a simple rule that should only be started at startup

rule "system startup"
when
	System started
then
	sendCommand(main,ON)
	sendCommand(Geburt_name,"")
	postUpdate(Delayed_Start,OFF)
	createTimer(now.plusSeconds(180)) [|sendCommand(Delayed_Start,ON)]
end

But as the event log shows it is triggered at one minute past one in the night.

2016-11-22 01:01:00.024 [ItemCommandEvent          ] - Item 'main' received command ON
2016-11-22 01:01:00.031 [ItemCommandEvent          ] - Item 'Geburt_name' received command 
2016-11-22 01:01:00.040 [ItemStateChangedEvent     ] - Delayed_Start changed from ON to OFF

Nowhere else the item main is changed in my code. It is absolutely clear that this rule was triggered.

Note: I have indeed a Time cron event that is triggered at one minute past one. But this rule is only triggered when system is started and then no further

rule "system startup"
when
    Time cron "0 1 1 * * ?" or
	System started
then
....

I have the feeling that the assignment of cron triggers is not properly done to related rules.

Also note: I have a pretty long rules file which has about 2400 lines of code.

Another example is the following rule

rule "Uhr incrementieren"
when
	 	when Time cron "0 0/1 * * * ?" or
		System started
then
	sendCommand(Uhr,new DateTimeType())
end

As the event log shows this rule is only triggered at system startup but not every minute

2016-11-21 20:35:20.123 [ItemCommandEvent          ] - Item 'Uhr' received command 2016-11-21T20:35:20.115+0100

20:35:20 was System startup.

I discovered a syntax error in the 3rd example. I have been using two times “when”.
After remove the “when” the 3rd example continued to work.

Strangely no error was flagged in the log.
I do not know whether this syntax error has effect of the other timers.

In general, the log is basically not usable from a users point of view. It provides endless Java errors provides hardly a clue where the error was cause in the DSL of the user.

It seems that OH2 Timers are not working if the same timer is used in different rules.

rule "Uhr incrementieren"
when
	 Time cron "0 0/1 * * * ?"
then
	logInfo("erstes Timerue","eins")
end

rule "Uhr incrementieren"
when
	 Time cron "0 0/1 * * * ?"
then
	logInfo("zweite Timerue","zwei")
end

in Log I am receiving

10:14:00.034 [INFO ] [marthome.model.script.erstes Timerue] - eins
10:14:00.079 [INFO ] [marthome.model.script.erstes Timerue] - eins

and a third rule, having this timer is not triggered at all.

Remove these two rules and not restarting OH2 does not recover the not triggered rule

I’ve seen several posts the last days complaining about timer problems (also in the German forum), maybe it’s time to open an issue for that?

Which git hub would this issue to be added.
It is always frustating creating an issue which is immediately closed by Kai due to the wrong issue tracker.

As a non-programmer I always have the same problem :slight_smile:
Because the problem is not binding related I guess it goes to

I don’t do this to offend, just to guide you as mentioned here: “But do not worry - if you are not clear, which category your issue belongs to - we will redirect you, if necessary.”

Usually a good hint are the classnames of the logger: In the case of cron scheduled rules, you will find “org.eclipse.smarthome” in most logging statements, so ideally this goes to https://github.com/eclipse/smarthome/issues.

But @sihui is right: In case of doubt, the openhab-distro is always the best option to go for.

Thanks. So I will create an issue for the cron Timers.

I’m observing a cron problem as well, as reported here.. If you are ready with creating the issue I can add some more data.

User has to use different rule names.
This is resolving issue above.

It seems this sensitivity on unique rule names is a new feature of OH2.
Because I have been using rules with same names for sometime.

I have created the issue but closed it again, after Kai told me to use different rule names.

Sorry for that, I was looking for open issues only. So then I’ll create based on my “findings”.

Created here