Simple Rule Help - Time + Switch

Hi all, I’m sure this will be a 1 second answer, but I can’t figure out what’s going on and trying something very simple.

rule "Auto Off Lights"
Time cron “0 16 1 * * ?” <----- I keep increasing it by a few minutes to see if it fires but it isn’t
sendCommand(M_Lamp, OFF)

I’ve got M_Lamp defined in items (Yes it is firing 433mhz on a Pi)

Switch M_Lamp “Main Lamp” (loungeroom)

but nothing’s happening. ideas? thanks total OH noob here

Split problem like this.
Create new PROXY switch with a UI depiction. Use changes in this to trigger rule(s) with THEN clauses like your cron rule manually to verify integrity of your THEN clause.

In parallel, make new rule with same cron WHEN clauses but a dummy THEN that just does logging to verify if it fires or not.

BTW – I think it is in your cron statement (at least)…see here…cron syntax looks like your rule as stated only fires on the first of the month…

Thanks for the reply.

So I’ve taken your suggestion and broken the rule into two parts. I now know for a fact that the actual switch actuation is working by linking it to another arbitrary event.

Therefore, the issue must be on the “when time cron” trigger. To test that the cron rule is working, I’ve changed it to

Time cron “* * * * * ?” (fires every second) and “0 * * * * ?” (fires every minute) and both work.

but when I put in a minute and hour e.g. - Time cron “18 11 * * * ?” it doesn’t seem to work. Initially thought this was because of timezone, but my timezone is set locally and I’ve restarted cron. Could cron be using UTC?

nevermind - figured it out - according to another thread this is based on Quartz scheduler which has seconds as well (so a total of 7 possible variables).