# Anyone know of a backoff node or flow

**URL:** <https://discourse.nodered.org/t/anyone-know-of-a-backoff-node-or-flow/995>\
**Category:** General\
**Created:** [21 June 2018 20:59 UTC](https://discourse.nodered.org/t/anyone-know-of-a-backoff-node-or-flow/995 "2018-06-21T20:59:48Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![WillWelker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/willwelker/32/771_2.png) [@WillWelker](https://discourse.nodered.org/u/WillWelker)\
**Post date:** [24 June 2018 05:00 UTC](https://discourse.nodered.org/t/anyone-know-of-a-backoff-node-or-flow/995/21 "2018-06-24T05:00:32Z")

</div>

I dealt with a similar issue by using a global variable counter. Every time a message is sent, you can increment the global counter. Once it reach the max number of messages, it won’t send anymore until the timed decrement inject node reduces the variable.

```auto
if (maxMsg < 10) {
//send message
maxMsg += 1;
global.set("maxCount",maxMsg);
}
// In a separate function triggered by an inject node every 10 minutes add this code 
var maxMsg = global.get("maxCount");
maxMsg -= 1;
if (maxMsg < 0) {
maxMsg = 0;
}
global.set("maxCount",maxMsg);

```

[Previous page](https://discourse.nodered.org/t/anyone-know-of-a-backoff-node-or-flow/995.md?page=1)
