# Execution time changing inject delay

**URL:** <https://discourse.nodered.org/t/execution-time-changing-inject-delay/74108>\
**Category:** General\
**Created:** [24 January 2023 08:34 UTC](https://discourse.nodered.org/t/execution-time-changing-inject-delay/74108 "2023-01-24T08:34:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![crester](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crester/32/21997_2.png) [@crester](https://discourse.nodered.org/u/crester)\
**Post date:** [24 January 2023 08:34 UTC](https://discourse.nodered.org/t/execution-time-changing-inject-delay/74108/1 "2023-01-24T08:34:57Z")

</div>

Hello.  
I have an inject delay of 5 minutes executing a flow that checks a device temperature and when reach the allowed high, it switchs ona fan.  
Same inject stops the fan when the temperature is bellow that high, so the temperature drops but not too much.  
I have thought to separate the flows, one to switch the fan on and another to switch it off, but I wonder if it is possible to change the inject node delay in execution time and simplify the flows.  
Is it possible?  
Thank you.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [24 January 2023 10:48 UTC](https://discourse.nodered.org/t/execution-time-changing-inject-delay/74108/2 "2023-01-24T10:48:55Z")

</div>

- How are you reading the temperature of the device?
- can the sensor itself send back the temperature?
- What temp do you turn on the fan and what temp do you turn it off?
- can you provide your current flow?
- what version of NR and node.js are you running? (see the startup log for this)

---

<div class="post-metadata">

**Author:** ![crester](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crester/32/21997_2.png) [@crester](https://discourse.nodered.org/u/crester)\
**Post date:** [24 January 2023 13:07 UTC](https://discourse.nodered.org/t/execution-time-changing-inject-delay/74108/3 "2023-01-24T13:07:16Z")

</div>

Well, the topic asks for changing in executuion time the inject node timer use case.

Not related on how to get the temperature. But if you are interested in, I can explain.  
The connection is a SSH connection that asks the sensor about the temperature, receiving it in a string and regex it to get the number  
This number (current temperature) is switched and if greater than, switch the fan on and otherwise switch the fan off

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [24 January 2023 14:03 UTC](https://discourse.nodered.org/t/execution-time-changing-inject-delay/74108/4 "2023-01-24T14:03:32Z")

</div>

> [@crester](#):
>
> changing in executuion time the inject node timer use case.

I'm not sure what you mean by that, however your flow is concise and does what you want. If you want to dynamically change the time between sending requests for data, take a look at node-red-contrib-configurable-interval.

You could create a dashboard using ui-number to enter the interval that you want, feed that thru the interval node to set the amount of time between its injects.

At least I think that is what you want to do... 😁

---

<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:** [25 March 2023 14:03 UTC](https://discourse.nodered.org/t/execution-time-changing-inject-delay/74108/5 "2023-03-25T14:03:45Z")

</div>

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