# How to block trigger node?

**URL:** https://discourse.nodered.org/t/how-to-block-trigger-node/14928
**Category:** General
**Created:** [30 August 2019 08:57 UTC](https://discourse.nodered.org/t/how-to-block-trigger-node/14928 "2019-08-30T08:57:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hathemi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hathemi/32/3792_2.png) [@hathemi](https://discourse.nodered.org/u/hathemi)
#### Post date: [30 August 2019 08:57 UTC](https://discourse.nodered.org/t/how-to-block-trigger-node/14928/1 "2019-08-30T08:57:00Z")

</div>

i have a trigger node that resend me the existant msg every 1s.  
Isthere a way to block the sending msg for a limit time ?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [30 August 2019 09:28 UTC](https://discourse.nodered.org/t/how-to-block-trigger-node/14928/2 "2019-08-30T09:28:47Z")

</div>

If a Trigger node is sending a message when it should not then that is a bug or s/w version issue of some sort. Can you explain in more detail exactly what is happening?  
I wonder if perhaps it is an Inject node that you refer to not a Trigger node.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [30 August 2019 09:33 UTC](https://discourse.nodered.org/t/how-to-block-trigger-node/14928/3 "2019-08-30T09:33:06Z")

</div>

If you have set the trigger to resend the existing message very 1 second and you just want to stop receiving that along your flow. You could look at using a context variable.  
See [https://cookbook.nodered.org/basic/route-on-context](https://cookbook.nodered.org/basic/route-on-context)

So in a second flow you can set a context flow ( on / off ) and then in your existing flow ou have a switch that detects the context variable flow.

Although it might be time to redesigning your flow...

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [30 August 2019 09:57 UTC](https://discourse.nodered.org/t/how-to-block-trigger-node/14928/4 "2019-08-30T09:57:12Z")

</div>

The Trigger node has not got an option to resend the existing message, unless I am confused.

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [30 August 2019 09:59 UTC](https://discourse.nodered.org/t/how-to-block-trigger-node/14928/5 "2019-08-30T09:59:58Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f5fe40331417f82a140a150272a7d408368be5af.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [30 August 2019 10:11 UTC](https://discourse.nodered.org/t/how-to-block-trigger-node/14928/6 "2019-08-30T10:11:55Z")

</div>

Now I am feeling very silly, I had never noticed that.  
So to answer the question you could use node-red-contrib-simple-gate to block the messages when required. If you want to stop it for a certain time then you can use a Trigger node to send the Close message to the gate then after the defined time send the Open message.
