Issue with creating a time management rule with cron

Hello Community,

I´m trying to create an rule to manage to turn my shelly devices on and off at a specific time. This is my first rule ever. My items are set up via PaperUI and I simply started to implement my rule.

rule "wakeUpItems"

    when
        Time cron "0 12 15 1/1 * ? *"
    then 
        sendCommand(Licht_Kreise, ON)
end

I tried several different ways, and normally there must be a simple solution for this problem. I would like to turn on my devices with a time cron call. However, it is just not working. Could somebody help me out? Or give me an better way to do it?

  • Platform information:
    • OS: Openhabian on Raspberry 3
    • openHAB version: 2.5.5.1

What time did you have in mind? Currently you’ve got a few minutes past three o’clock.

First checks - does your rule file load? There will be a message about that in your openhab.log

Second check - does your rule run, but not do what you expect? Look in your openhab.log and events.log for messages at your target time.

1 Like

Thanks for answering! The time was just for testing issue. I wasn´t going to wait for testing :smiley: The rule should turn on all devices at 8 am.

I was wondering about that, where do I find the logs? I´m editing my rules with visual studio code.

Depends on your host system. You should have a fairly obvious /userdata folder.

If you’re having doubts about where to find files, note also that you must both use correct filename extensions and place in correct folder, for rules to be loaded.

When the rule is edited there is an log. However, at the desired time the rule should function is no log.

What does the log say. Give us something to work with. Rules like this work for everybody else, so you know you are just looking for a simple oversight.

After carefully looking at the logs I found out that the time of my openhab system and my local time are not identically. Thats the issue!

1 Like