Reschedule of timer not working

Hi,

i have created a rule to set a timer with reschedule function, but as ist seem something is not working with the reschedule function.

16:07:39 there was a reschedule event but timer expired 16:09:21 :frowning:

Thanks
Thomas

rule "Kueche an"
when
    Item Bewegung_EG_Kueche changed
then
    if(Bewegung_EG_Kueche.state==ON) {
		logInfo("Kueche","an")
		sendCommand(Light_EG_Kueche_Decke,ON)
		sendCommand(Light_EG_Kueche_Table,ON)
        if(Kueche_timer===null) {
			logInfo("Kueche","Timer an")
            // first ON command, so create a Kueche_timer to turn the light off again
            Kueche_timer = createTimer(now.plusSeconds(600)) [|
                sendCommand(Light_EG_Kueche_Decke,OFF)
				sendCommand(Light_EG_Kueche_Table,OFF)
				Kueche_timer = null
				logInfo("Kueche Timer","aus")
            ]
        } else {
            // subsequent ON command, so reschedule the existing Kueche_timer
            Kueche_timer.reschedule(now.plusSeconds(600))
			logInfo("Kueche retrigger","+600 s")
        }
    } 
end

here the log

2020-07-17 16:07:39.330 [INFO ] [clipse.smarthome.model.script.Kueche] - an

2020-07-17 16:07:39.330 [INFO ] [rthome.model.script.Kueche retrigger] - +600 s

2020-07-17 16:07:39.331 [ome.event.ItemCommandEvent] - Item 'Light_EG_Kueche_Decke' received command ON

2020-07-17 16:07:39.334 [ome.event.ItemCommandEvent] - Item 'Light_EG_Kueche_Table' received command ON

2020-07-17 16:08:10.536 [vent.ItemStateChangedEvent] - Bewegung_EG_Kueche changed from ON to OFF

2020-07-17 16:09:14.950 [vent.ItemStateChangedEvent] - Bewegung_EG_Kueche changed from OFF to ON

2020-07-17 16:09:14.950 [INFO ] [clipse.smarthome.model.script.Kueche] - an

2020-07-17 16:09:14.951 [INFO ] [rthome.model.script.Kueche retrigger] - +600 s

2020-07-17 16:09:14.953 [ome.event.ItemCommandEvent] - Item 'Light_EG_Kueche_Decke' received command ON

2020-07-17 16:09:14.955 [ome.event.ItemCommandEvent] - Item 'Light_EG_Kueche_Table' received command ON

2020-07-17 16:09:21.601 [INFO ] [.smarthome.model.script.Kueche Timer] - aus

2020-07-17 16:09:21.603 [ome.event.ItemCommandEvent] - Item 'Light_EG_Kueche_Decke' received command OFF

2020-07-17 16:09:21.606 [ome.event.ItemCommandEvent] - Item 'Light_EG_Kueche_Table' received command OFF

2020-07-17 16:09:21.762 [vent.ItemStateChangedEvent] - Light_EG_Kueche_Decke changed from ON to OFF

2020-07-17 16:09:21.873 [vent.ItemStateChangedEvent] - Light_EG_Kueche_Table changed from ON to OFF

2020-07-17 16:09:45.414 [vent.ItemStateChangedEvent] - Bewegung_EG_Kueche changed from ON to OFF

2020-07-17 16:14:37.439 [vent.ItemStateChangedEvent] - Bewegung_EG_Kueche changed from OFF to ON

Did you define Kueche_timer as a global Timer var?

yes on top of the rule file

var Timer Kueche_timer = null

Don’t forget that if you edit your rule while a ten-minute timer is in progress, it does not go away. It continues to run as an “orphan” but your handle to do anything with it (like rescheduling) is lost.

What’s in the log at 16:19 ?