# Stop a running flow

**URL:** <https://discourse.nodered.org/t/stop-a-running-flow/21353>\
**Category:** General\
**Created:** [6 February 2020 14:32 UTC](https://discourse.nodered.org/t/stop-a-running-flow/21353 "2020-02-06T14:32:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvklink](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@pvklink](https://discourse.nodered.org/u/pvklink)\
**Post date:** [6 February 2020 14:32 UTC](https://discourse.nodered.org/t/stop-a-running-flow/21353/1 "2020-02-06T14:32:30Z")

</div>

Hi,  
I hope I can explain my functionality well. I have a management environment in which I can start functionality via a menu (flows). Some flows can also start automatically with an injection.

Now I want to be able to start a flow (by example refresh the camera every 5 seconds (that's no problem, i already have this in place) but i also want to be able to stop this running flow, with the dashboard, is that possible?  
Is there anything to show the ID of a started flow so that you can also stop the flow with this id, or in another way?

At this moment I use the repeat function for the cam, and use a very large number, but this is not adjustable during execution...

 ![beheer](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bb46c3036b6bcbaffc0004c522586752e54f07c7.jpeg)

---

<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:** [6 February 2020 16:02 UTC](https://discourse.nodered.org/t/stop-a-running-flow/21353/2 "2020-02-06T16:02:18Z")

</div>

All flows are "running" all the time, in the sense that the nodes are available to receive or send messages when required. If, by stopping a flow you mean interrupting the sequence of messages then node-red-contrib-simple-gate might be useful to you. You can tell it to pass or block messages as required.

---

<div class="post-metadata">

**Author:** ![pvklink](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@pvklink](https://discourse.nodered.org/u/pvklink)\
**Post date:** [6 February 2020 16:27 UTC](https://discourse.nodered.org/t/stop-a-running-flow/21353/3 "2020-02-06T16:27:25Z")

</div>

ok thanks!

---

<div class="post-metadata">

**Author:** ![pvklink](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@pvklink](https://discourse.nodered.org/u/pvklink)\
**Post date:** [6 February 2020 16:48 UTC](https://discourse.nodered.org/t/stop-a-running-flow/21353/4 "2020-02-06T16:48:42Z")

</div>

I solved it!  
Used a text input node to give a value for the msg.repetitions.  
I made a global for this and the flow is reading this value in the loop.  
So i can start and adjust the loop during execution..

---

<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:** [20 February 2020 16:48 UTC](https://discourse.nodered.org/t/stop-a-running-flow/21353/5 "2020-02-20T16:48:54Z")

</div>

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