Openhab in docker does not execute cron jobs

  • Platform information:
    • Hardware: pi4
    • OS: Raspbian 10
    • Java Runtime Environment: from docker
    • openHAB version: docker latest-debian
  • Issue of the topic: cron jobs not executed

I have just migrated to openhab3 (step by step, most things are migrated, n ow I am going to migrated my rules). I have created some very basic Schedule rules via the gui, but the rules never get executed. They are listed under “Rules”, they are also listed under “Schedule”, but not started and I do not find any information about the rules in the logs.

So I assume I am missing some simple config for docker, right?

This has nothing to do with the fact that it’s running in Docker.

Do you have logging in these rules? If not then there will be nothing in the logs to indicate that they are running by default.

Rich you are right, the cron is executed. But something immediately resets the actions. From the event log:

2021-03-19 05:40:00.557 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HeizungDiele_SetTemperature' changed from 17.00 °C to 21.0 °C
2021-03-19 05:40:36.582 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HeizungDiele_SetTemperature' changed from 21.0 °C to 17.00 °C

The first action is triggered by my cron. How can I find the reason for the second action?

BTW: after I switched to openhab3 last weekend, I discovered this behavior several times: I change the state of an item and a few moments later the state switches back to the old state. As this happened sometimes without any visible pattern and only for manual actions, I decided to look into this somewhere later. But this cron thing happens each day, so I think there could be a chance to find the reason.

“Immediately” is half a minute later. While we can’t tell who did that update, you can look for suspects.
The favourite would a channel linked to that Item. It’s quite normal for a binding to update an Item state when it gets a status from a device or service.

Is your rule supposed to be sending a command to some device, not just updating an Item state?

The rule updates the state:

  - id: "1"
      cronExpression: 0 40 5 ? * MON,TUE,WED,THU,FRI *
    type: timer.GenericCronTrigger
conditions: []
  - inputs: {}
    id: "2"
      itemName: HeizungBad_SetTemperature
      state: "22"
    type: core.ItemStateUpdateAction
  - inputs: {}
    id: "3"
      itemName: HeizungDiele_SetTemperature
      state: "21"
    type: core.ItemStateUpdateAction

Oookay, are you expecting that to affect some external device in any way? (It won’t.)

Is your Item actually linked to some external device, perhaps? We haven’t found out yet.

It may sound silly, but yes, I am expecting the heating to change its temperature to 22 degrees. Do I have to send a command to achieve this effect?

The item is linked to an temperature control device.

Well, yes. You seem to have missed a key understanding of openHAB workflow. If you want something to happen, send a command. If you want to look at some condition, examine the state.