MQTT xmas-light timer [SOLVED]

I have a switch/relay that worked great with MQTT:

Switch Sonoff2 "Sonoff 2" {mqtt=">[schuppen1:/Sonoff2/gpio/12:command:ON:1],>[schuppen1:/Sonoff2/gpio/12:command:OFF:0]"}

But i fail with my rule to switch to a specified time:

rule “XMASbeleuchtung  Mama einschalten”
when
    Time cron “0 0 20 * * ?”
then
    sendCommand(Switch Sonoff2, ON)
end
rule “XMASbeleuchtung Mama ausschalten”
when
    Time cron “0 0 22 * * ?”
then
    sendCommand(Switch Sonoff2, OFF)
end

the rule have the ending *.rules
I have no further addons installed so far except MQTT stuff.
What i am doing wrong here?
I use openhab 1.8.3 on a Raspberry 3 with Jessie onboard

try

Sonoff2.sendCommand(ON)

this way?

rule “XMASbeleuchtung  Mama einschalten”
when
    Time cron “0 0 20 * * ?”
then
    Sonoff2.sendCommand(ON)
end
rule “XMASbeleuchtung Mama ausschalten”
when
    Time cron “0 0 22 * * ?”
then
    Sonoff2.sendCommand(OFF)
end

yep

is not working, also no log entry in openhab.log or mqtt.log
do i need any addons for this?

You use Cron rule “0 0 22 * * ?” - it fires at 22:00.
Try to change to “0 * * * * ?” - every minute to check it works.

yepp i tried this, but unfortunately the switch is not switching.

I use:

Switch	Light_Table_CMD	"Lamp"	<light>	(gLights)	{ mqtt=">[agdisk:/esp/lamp/gpio/output14:command:*:MAP(on_is_1.map)], <[agdisk:/esp/lamp/gpio/output14:state:MAP(1_is_on.map)]" }

map files in transform folder:
on_is_1.map

OFF=0
ON=1

1_is_on.map

0=OFF
1=ON
-=?
undefined=?

Thank you for your help i try this out later, i need a break :wink:

I have adept your settings but the rule is still not working, also not with 1 minute cron.
Do i need a addon for this?

Ah it works now, during the configure i delete a -> " :slight_smile: thanks very much for help!