Trying to create a rule that repeats every 15 minutes

Hello - I am trying to create a rule that repeats every 15 minutes. It will set a few variables (as strings); date, room, temperature, then send the results to a Google Sheet. It works when I manually click 'run actions', but it does not run "on its own"/"automatically every 15 minutes". I am hoping someone could give me some pointers if there's something I'm not doing correctly.

Here is how it's currently configured:

Thanks!!

How have you setup your rule trigger?

4 Likes

Youā€™ve created a repeating action. Perhaps instead you want a repeating Trigger? A trigger is needed for a rule to run.

Without a trigger, a rule must be run by another rule (which obviously would need a trigger! :wink:)

4 Likes

Ahh! I mustā€™ve had a brain-fart! I added a ā€˜kickoffā€™ trigger (when time of day is 22:00), and that seems to have worked twice in a row now.

Is that what you want, though? If you never stop it, you could get overlapping executions. I'd use a periodic trigger if you want it every 15 minutes all the time (and it looks like you do unless you have another rule acting on this one that we can't see, since that's what you have).

5 Likes

Should I construct the rule similar to:
Trigger: 15-minute periodic timer
Actions: [perform some actions]
or
Actions: repeat every 15-minutes, [perform some actions], end-repeat

...or some other method?

The second rule will never trigger unless you do so manually. Either can work, depending on how you set it up (but your current rule is sort of an odd combination of the two).

I would suggest the first option.

1 Like

Assuming you don't care exactly when the rule fires, I would do the 15-minute periodic trigger to perform the actions once.

If you have specific times you'd like the rule to fire, I'd use "Periodic schedule"/"Cron String". For example, to fire at 3 minutes after the hour, and then every 15 minutes after that, the Cron string would be "0 3/15 * ? * * *". When you go to enter your Cron string, there's a very helpful "Cron Expression Generator" link right there.

1 Like

All the above said, I would REALLY consider a virtual (or physical) switch to use as a required expression so that you can kill it if there are issues. Any time you create a loop, you want an ability to cancel or stop it.