# Trigger 'wait for' only sends string once. Want to keep triggering until condition changes

**URL:** <https://discourse.nodered.org/t/trigger-wait-for-only-sends-string-once-want-to-keep-triggering-until-condition-changes/69858>\
**Category:** General\
**Created:** [31 October 2022 19:43 UTC](https://discourse.nodered.org/t/trigger-wait-for-only-sends-string-once-want-to-keep-triggering-until-condition-changes/69858 "2022-10-31T19:43:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbmgf7](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rbmgf7](https://discourse.nodered.org/u/rbmgf7)\
**Post date:** [31 October 2022 19:43 UTC](https://discourse.nodered.org/t/trigger-wait-for-only-sends-string-once-want-to-keep-triggering-until-condition-changes/69858/1 "2022-10-31T19:43:02Z")

</div>

I have a situation where I'm measuring natural gas meters for flow. If something happens and the gas flows below 1 SCFM, then I send an email to notify the respective person.

I have the trigger node (send is set to nothing and then 'wait for' is used) configured so if the condition is sustained for 1 or less SCFM for 10, minutes, it sends the email. It will jump out of the trigger and reset using msg.reset if it happens to flow above 1 during that time. However, it will only send the string once for as long as the incoming value is below 1. I want to keep sending strings every 10 minutes until the condition changes. Right now the trigger just resets after 10 minutes.

---

<div class="post-metadata">

**Author:** ![rbmgf7](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rbmgf7](https://discourse.nodered.org/u/rbmgf7)\
**Post date:** [31 October 2022 19:51 UTC](https://discourse.nodered.org/t/trigger-wait-for-only-sends-string-once-want-to-keep-triggering-until-condition-changes/69858/2 "2022-10-31T19:51:17Z")

</div>

Right after I posted, I had a thought.

I put a second trigger node right after the first one that uses the same message in the 'send', then use 'resend it every' for 10 minutes.

Cheesy but it works.

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [31 October 2022 20:03 UTC](https://discourse.nodered.org/t/trigger-wait-for-only-sends-string-once-want-to-keep-triggering-until-condition-changes/69858/3 "2022-10-31T20:03:33Z")

</div>

can't you put a delay behind it and check the initial node again? Then you would actually have the desired loop

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 December 2022 20:03 UTC](https://discourse.nodered.org/t/trigger-wait-for-only-sends-string-once-want-to-keep-triggering-until-condition-changes/69858/4 "2022-12-30T20:03:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
