Rule Help - repeat event every 14 days

This should be so simple in RM but I cannot find how to do it. I have a rule already setup that does the following:

On Tuesday at 17:00 > Switch on > Wait until 09:00 > Switch off. I'm assuming as I've set the day as Tuesday in the day of week schedule this will happen every Tuesday without adding anything else as it has occurred once and the rule is still running.

I want to create a similar rule to start this Tuesday at 17:00 but this one should be every 14 days.

  • I can't set it as Tuesday otherwise it'll trigger every 7 days?
  • I can't set it as a periodic schedule for every 14 days, as it'll commence at 17:00 on the day I create the rule rather than on Tuesdays.
  • I can set a cron expression. When I've checked the generator I could set this as every 14 days, starting on the 26th (this Tuesday) at 17:00. However when I read the description for the cron "0 0 17 26/14 * ? *" it reads as "At 17:00:00pm, every 14 days starting on the 26th, every month". This seems to indicate that although it will start this Tuesday 26th and go each 14 days - it'll reset each month on the 26th.

I must be missing something very simple. Can anyone advise the best way to do this. Or do I have to just remember to create the rule on the day I want it to run? TIA

Create your trigger for Tuesday at 17:00. Create an action that switches a boolean (either Private Boolean or local boolean variable) to true if it's false or to false if it's true. Then create a conditional action that'll run if your boolean is true to turn on your switch. This condition will only be true every other week.

Here's an example that should be helpful

@pseudonym - that's spooky - the example you linked to is the reason for my rule - light a tile on my panel that corresponds with "put out the recycling". Thanks for your help.

Does this look right - thanks?

Looks like it should work, though I'd add an END-IF.

2 Likes

When you say add an END-IF. Is that as the last step and does it need anything else attached to it or solely END-IF. Thanks.

Solely an END-IF. It would be the last step.

Perfect thanks