2 cron commands?

With OH1, I had some rules based on cron.
A strange thing with OH2 and the same rule? It only triggers the first cron? So in the example below, the ruls is only triggerd at 5AM, not at 5PM?

rule "Set Aquarium/Terrarirum ON at 5AM and 5PM"
        when 
                Time cron       "0 0 5 ? * *"
                or Time cron    "0 0 17 ? * *"
        then
                sendCommand( OutletAquariumTerrarium, ON )
        end

Any suggestion what can be wrong?

OK, strange.

Iā€™ve been tested this around, and the ā€˜ORā€™ function doesnā€™t work in the CRON for me.
If I create 2 seperate rules, it works.

So for the moment, itā€™s working like this.
But of course, it would be cleaner to use the OR-function in the time cron.

Iā€™d use one cron job like ā€œ0 0 5,17 * * ?ā€

1 Like

Grrr, why didnā€™t I think of that. :blush:

It works fine with comma seperate values. Thanks!!!

For this, itā€™s working fine. Since timing is not so important. But for more complex combinations (fe start at 5:15, 14:25 and 23:40), itā€™ll be difficult. A bit strange that in OH1, the rule worked, and with OH2 it doensā€™t? So if somebody has an explanation for future useā€¦ :wink: