Wait Within A Repeat

Is there a way to pause the rule until a certain time? I'm not certain if the wait is actually a pause.

I put a wait until a certain time to send messages within a 2 hour repeat loop. Will it wait until that time, send the message and then resume the 2 hour repeat loop if the wait time is greater than two hours or will I have a bunch of messages stacking up to send until the wait event is satisfied?

Yes, but…

When your rule hits the “Wait for event: When time is 8:00AM, it will stop and only continue when the 8:00AM condition occurs. But when the repeat restarts, it will cancel the wait condition. In the end, the result will be the same. If the rule is triggered before 8AM, it will notify you at 8AM.

In case you’re interested, here is the rule I created to test how RM would treat a wait condition within a repeat loop:

With the logs showing the result:

You could also remove the if condition and replace it with a While condition: Between two times: 8:00AM and 9:00PM. It is essentially the same things, but just with less lines of code.

1 Like

Thank you for that! I had not thought of using a WHILE and I also learned about how to test a condition while making an entry in the log. Much appreciated!

1 Like

This is the code that I ended up using. It incorporates the WHILE statement and I find it much easier to follow. Even better than that, it works!