Smarthome: Multiple time cron expressions in rule not working

Created on 18 Dec 2016  路  5Comments  路  Source: eclipse-archived/smarthome

As requested ( https://github.com/openhab/openhab-distro/issues/355 ) I'm opening a new issue.

Works (fires every five seconds):

rule "cron test"
when
    // Time cron "0 0 0 * * ?" or
    Time cron "0/5 * * * * ?"
then
    logInfo("cron", "test")
end

Doesn't work as expected (second cron doesn't fire):

rule "cron test"
when
    Time cron "0 0 0 * * ?" or
    Time cron "0/5 * * * * ?"
then
    logInfo("cron", "test")
end

I'm using the current apt version of openhab:

openhab2-offline/testing,now 2.0.0~b4 all  [installiert]
  openHAB Offline Distribution
DSLRules bug

Most helpful comment

Just to update - this issue still persists for the OH2 snapshot version (seen with 20170114).

Regards, Pawe艂

All 5 comments

Just to update - this issue still persists for the OH2 snapshot version (seen with 20170114).

Regards, Pawe艂

I can confirm the issue. For each rule only the first Time cron is used.
Any other ORs (like Item received update) are working well.

Came accross this issue today as well. Quite a bit annoying to have as many rules as cron entries needed.

My use-case:

rule "Lights off depending on day of week"
when
    Time cron "00 15 22 ? * MON-THU,SUN" or
     Time cron "00 30 23 ? * FRI-SAT"
then
.... 

+1

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kaikreuzer picture kaikreuzer  路  9Comments

afuechsel picture afuechsel  路  9Comments

jvivanco28 picture jvivanco28  路  5Comments

remogloor picture remogloor  路  10Comments

kubawolanin picture kubawolanin  路  3Comments