Rules continue to stop running

I have several rules that I would like to run every 90 seconds and every day or so the variables I used to count stop working and I have to trip them manually. Any thoughts as to why? Here is one of my rules:

I don’t see why the loop is needed. Your top-level IF Condition could be turned into Triggers which would make the rule event driven.

Of course this simplified example would only be triggered when any of the contact sensors change to staying open for X minutes. It would then check if the switch was not off and act accordingly.

If you’re worried about the case where the Switch gets turned on after the contact sensors had already been open for X minutes, you could either add that as a separate rule to check that particular scenario… or you could add the switch staying on for X minutes as a trigger and then add another condition to your rule to distinguish between the two event types and the type of check that is needed.