Cron Rules - Simple Use Case

So I need help with a simple use case… I looked everywhere and I tried all the examples. I don’t get an error but it just never fires. Any ideas? I do have other rules that turn off and on Garage power and they work fine. Thanks in advance.

Use Case = Turn on Garage Power at 6 AM

//Set Garage Door to close after 11*********
rule "Turn Garage Auto Close ON"
when
Time cron “0 0 6 * * ?“
then
logInfo(“In Cron------>ZooZ”,” Zooz power ON”)
sendCommand(ZOOZ_garage_door_pwr,“ON”)
end

Did you directly copy/paste bits of your rule from the forum? It looks like you have two different types of double quotes. You may need to retype them. I’ve copied examples from the forum and found that sometimes the double quotes someone had used would cause havoc for my rule.

If you are turning on/off garage power the same way in other rules, it wouldn’t be the problem, but you may also want to change to the sendCommand method… it’s much friendlier to use:

http://docs.openhab.org/configuration/rules-dsl.html#sendcommand-method-vs-action

ZOOZ_garage_door_pwr.sendCommand(ON)

1 Like

Well… the " are legit in the rules file. Thanks for the sendCommand advice. I’m still not sure why the cron never fires.

OK - So I changed the Send Command syntax and now it is working. I use that other syntax elsewhere and it is working there. Strange but THANKS!!!

When I copy and paste your rule from your post into a text editor, it is clear that there are two different double quotes. The ones you had in the sendCommand (these ”) are curly (smart), where the others are straight ("). I’ve had issues with the curly ones. When you changed to the sendCommand method, it must have removed the offending quotes that were causing issues for the rule.