Rule only working on manual use

I have the following rule:

configuration: {}
triggers:
  - id: "2"
    configuration:
      cronExpression: 0 20 6 ? * MON,TUE,WED,THU,FRI *
    type: timer.GenericCronTrigger
conditions: []
actions:
  - inputs: {}
    id: "1"
    configuration:
      command: ON
      itemName: SZ_1OG_Wand_L1_Schalter
    type: core.ItemCommandAction

If I press the blue play button the light is on
At 6:20 the light stays off

What am I doing wrong?

The cron expression is correct. So, the most likely cause is that your system time is not correct.

Depending on how you are running OH there are several different reasons that your system time could be incorrect. The first things to check are that you set the correct timezone in the oh settings and that you have set the correct timezone in java.

Thanks for your reply.
The light stays off forever.
I’m using a docker container on an Ubuntu Machine.
The time on the Ubuntu Machine is correct.
docker exec -it openhab bash → date → current date/time is correct. with CET (also correct).
The Docker says 11PM, the Ubuntu machine 23:00 - is this a Problem?

Shouldn’t be.

What about in OH itself? Do you have the correct region/timezone set in the OH settings?

Do you see any errors in the logs around the time when the rule is supposed to run?

Openhab says Germany and GMT Europe/Berlin +1. This is correct.
All I can see:

2024-01-08 06:20:00.418 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SZ_1OG_Wand_L1_Schalter' received command ON
2024-01-08 06:20:00.418 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SZ_1OG_Wand_L1_Schalter' predicted to become ON

Every Monday, Tuesday, Wendesday, Thursday, Friday

at 6:45 it should switch from on to off

2024-01-26 06:45:00.344 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SZ_1OG_Wand_L1_Schalter' received command OFF
2024-01-26 06:45:00.345 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SZ_1OG_Wand_L1_Schalter' predicted to become OFF
2024-01-26 06:45:00.347 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Schalter' changed from ON to OFF
2024-01-26 06:45:00.347 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Schalter' changed from ON to OFF through SZ_1OG_Wand_L1_Schalter
2024-01-26 06:45:00.351 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Farbe' changed from 184.5446,3.874600,84.163 to 184.5446,3.874600,0
2024-01-26 06:45:00.351 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Helligkeit' changed from 84.163 to 0
2024-01-26 06:45:00.351 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Farbe' changed from 184.5446,3.874600,84.163 to 184.5446,3.874600,0 through SZ_1OG_Wand_L1_Farbe
2024-01-26 06:45:00.351 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Helligkeit' changed from 84.163 to 0 through SZ_1OG_Wand_L1_Helligkeit

Maybe that helps

Manual executing the ON-Rule:

2024-01-28 23:55:51.848 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SZ_1OG_Wand_L1_Schalter' received command ON
2024-01-28 23:55:51.848 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SZ_1OG_Wand_L1_Schalter' predicted to become ON
2024-01-28 23:55:51.849 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Schalter' changed from OFF to ON
2024-01-28 23:55:51.850 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Schalter' changed from OFF to ON through SZ_1OG_Wand_L1_Schalter
2024-01-28 23:55:51.854 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Farbe' changed from 184.5446,3.874600,0 to 184.5446,3.874600,84.163
2024-01-28 23:55:51.854 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Helligkeit' changed from 0 to 84.163
2024-01-28 23:55:51.854 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Farbe' changed from 184.5446,3.874600,0 to 184.5446,3.874600,84.163 through SZ_1OG_Wand_L1_Farbe
2024-01-28 23:55:51.855 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Helligkeit' changed from 0 to 84.163 through SZ_1OG_Wand_L1_Helligkeit

Ah, that is different. The rule is running correctly. The ON command is sent to the item at precisely 6:20. There is something going on with the connection between your item and the device at that time, however, that means the command is not sent on to the device (or the device doesn’t properly respond).

This is the difference right here. This ItemStateChangedEvent log line is the result of the binding actually registering that the device has changed. You do not get one of those log lines in the first instance, so the question that you must try to resolve is why not? What is it about 6:20 that means the binding/device isn’t responding fully?

I have found something:


2024-01-26 06:15:00.177 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Farbe' changed from 184.5446,3.874600,0 to 0,0,0
2024-01-26 06:15:00.177 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Farbe' changed from 184.5446,3.874600,0 to 0,0,0 through SZ_1OG_Wand_L1_Farbe
2024-01-26 06:16:14.975 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Farbe' changed from 0,0,0 to 184.5446,3.874600,84.163
2024-01-26 06:16:14.976 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Farbe' changed from 0,0,0 to 184.5446,3.874600,84.163 through SZ_1OG_Wand_L1_Farbe
2024-01-26 06:16:14.977 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Schalter' changed from OFF to ON
2024-01-26 06:16:14.977 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SZ_1OG_Wand_L1_Helligkeit' changed from 0 to 84.163
2024-01-26 06:16:14.977 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Helligkeit' changed from 0 to 84.163 through SZ_1OG_Wand_L1_Helligkeit
2024-01-26 06:16:14.978 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'SZ_DG_Wand_Schalter' changed from OFF to ON through SZ_1OG_Wand_L1_Schalter
2024-01-26 06:20:00.292 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SZ_1OG_Wand_L1_Schalter' received command ON
2024-01-26 06:20:00.293 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SZ_1OG_Wand_L1_Schalter' predicted to become ON

There was a very old time control on the deconz webUI
I deleted and will report tomorrow.

The Problem is solved by deleting the rule inside of deconz
my light was on from 6:20 to 6:45 like it should be