Activate a switch/Relay at a specific time

After reading the doc’s if your still not sure about the rule with a timer here is a working example. You needed to create the var Timer like below.

var Timer startTimer = null
rule “Relais off”
when
    Time cron "0 31 16 ? * *"
then
        Relais3.sendCommand(ON)
        startTimer = createTimer(now.plusMillis(10000), [|
        Relais3.sendCommand(OFF)
        startTimer = null
        ])

end

Also, here’s a link that will help with writing rules. Lots of examples and explanations.:+1: