# How to write rules for multiple/loop items

**URL:** <https://community.openhab.org/t/how-to-write-rules-for-multiple-loop-items/135094>\
**Category:** Scripts & Rules\
**Tags:** rules, openhab3\
**Created:** [April 13, 2022, 1:08pm UTC](https://community.openhab.org/t/how-to-write-rules-for-multiple-loop-items/135094 "2022-04-13T13:08:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [April 13, 2022, 2:26pm UTC](https://community.openhab.org/t/how-to-write-rules-for-multiple-loop-items/135094/2 "2022-04-13T14:26:24Z")

</div>

There really isn’t enough here to provide concrete advice. It’s not even clear what language you are using and whether this is in a text file or in the UI.

There are several irrigation tutorials on the forum including [Design Pattern: Cascading Timers](https://community.openhab.org/t/design-pattern-cascading-timers/31791). Additional useful tutorials include [Design Pattern: Associated Items](https://community.openhab.org/t/design-pattern-associated-items/15790) and [Design Pattern: Gate Keeper](https://community.openhab.org/t/design-pattern-gate-keeper/36483).

If you use JS Scripting, there’s a library you can install for Gatekeeper which makes implementing this really simple.

---

_[View the full topic](https://community.openhab.org/t/how-to-write-rules-for-multiple-loop-items/135094)._
