# One - time delay

**URL:** <https://discourse.nodered.org/t/one-time-delay/74389>\
**Category:** General\
**Created:** [30 January 2023 07:16 UTC](https://discourse.nodered.org/t/one-time-delay/74389 "2023-01-30T07:16:20Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![klio-klio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/klio-klio/32/37237_2.png) [@klio-klio](https://discourse.nodered.org/u/klio-klio)\
**Post date:** [30 January 2023 07:16 UTC](https://discourse.nodered.org/t/one-time-delay/74389/1 "2023-01-30T07:16:20Z")

</div>

There is a node for a one-time delay? .... somehow can't find.

---

<div class="post-metadata">

**Author:** ![greengolfer](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/greengolfer/32/28276_2.png) [@greengolfer](https://discourse.nodered.org/u/greengolfer)\
**Post date:** [30 January 2023 07:29 UTC](https://discourse.nodered.org/t/one-time-delay/74389/2 "2023-01-30T07:29:09Z")

</div>

Not sure what is a one time delay… but the “delay” node is there by default.

---

<div class="post-metadata">

**Author:** ![klio-klio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/klio-klio/32/37237_2.png) [@klio-klio](https://discourse.nodered.org/u/klio-klio)\
**Post date:** [30 January 2023 07:38 UTC](https://discourse.nodered.org/t/one-time-delay/74389/3 "2023-01-30T07:38:43Z")

</div>

I just don't want to delay the first time after that.

---

<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 January 2023 08:30 UTC](https://discourse.nodered.org/t/one-time-delay/74389/4 "2023-01-30T08:30:53Z")

</div>

Do you mean the first message is to be delayed, but not the messages after the first one?

---

<div class="post-metadata">

**Author:** ![klio-klio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/klio-klio/32/37237_2.png) [@klio-klio](https://discourse.nodered.org/u/klio-klio)\
**Post date:** [30 January 2023 08:45 UTC](https://discourse.nodered.org/t/one-time-delay/74389/5 "2023-01-30T08:45:56Z")

</div>

Yes. What I need.

---

<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 January 2023 09:05 UTC](https://discourse.nodered.org/t/one-time-delay/74389/6 "2023-01-30T09:05:29Z")

</div>

Suppose you have the delay set to 10 seconds.  
If the first message arrives at time 0 seconds, then you want that released at time 10 seconds  
If the second message arrives at time 5 seconds, when to you want it released?  
If the third arrives at time 20, when you want it released?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [30 January 2023 09:08 UTC](https://discourse.nodered.org/t/one-time-delay/74389/7 "2023-01-30T09:08:11Z")

</div>

The delay node can be set up to respond to msg.delay, but if msg.delay is missing it uses the time specified in the node.

So you could use flow context and change nodes to set msg.delay = 0 after the first message has passed.

---

<div class="post-metadata">

**Author:** ![klio-klio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/klio-klio/32/37237_2.png) [@klio-klio](https://discourse.nodered.org/u/klio-klio)\
**Post date:** [31 January 2023 08:14 UTC](https://discourse.nodered.org/t/one-time-delay/74389/8 "2023-01-31T08:14:36Z")

</div>

I have in the house heat pump with floor heating. The idea is: I would like to control the heating circles in the house differently.Some rooms should be preferred, but only for a certain time. I control only the bare necessities... All others remain uncontrolled. At the moment it is controlled differently than I would like.

 ![temp Screenshot 2023-01-31 091342](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/a/dac19d988b2b76dc79b1d52e9549917a95daa55d.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:** [31 January 2023 08:32 UTC](https://discourse.nodered.org/t/one-time-delay/74389/9 "2023-01-31T08:32:06Z")

</div>

I don't understand how that relates to the question you asked. In order for us to help you have to ask clear questions.

---

<div class="post-metadata">

**Author:** ![klio-klio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/klio-klio/32/37237_2.png) [@klio-klio](https://discourse.nodered.org/u/klio-klio)\
**Post date:** [31 January 2023 09:29 UTC](https://discourse.nodered.org/t/one-time-delay/74389/10 "2023-01-31T09:29:31Z")

</div>

I don't need timedelay the first True once delayed afterwards. after the false reset so that the next True can be active once again. Sorry :::use translators

---

<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:** [31 January 2023 09:37 UTC](https://discourse.nodered.org/t/one-time-delay/74389/11 "2023-01-31T09:37:21Z")

</div>

Please give an example sequence of events, with times, to illustrate what should happen. You did not respond to my previous post, which was:

> [@Colin](#):
>
> Suppose you have the delay set to 10 seconds.  
> If the first message arrives at time 0 seconds, then you want that released at time 10 seconds  
> If the second message arrives at time 5 seconds, when to you want it released?  
> If the third arrives at time 20, when you want it released?

---

<div class="post-metadata">

**Author:** ![klio-klio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/klio-klio/32/37237_2.png) [@klio-klio](https://discourse.nodered.org/u/klio-klio)\
**Post date:** [31 January 2023 10:13 UTC](https://discourse.nodered.org/t/one-time-delay/74389/12 "2023-01-31T10:13:28Z")

</div>

At the first message, 10 s. is extended. No matter what comes within 10s for true messages. When the 10s have expired, all true messages will be passed on without delay

---

<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:** [31 January 2023 10:33 UTC](https://discourse.nodered.org/t/one-time-delay/74389/13 "2023-01-31T10:33:10Z")

</div>

> [@klio-klio](#):
>
> No matter what comes within 10s for true messages

Do you mean that you want to ignore messages within that 10 seconds?  
What about False messages?

---

<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:** [31 January 2023 10:46 UTC](https://discourse.nodered.org/t/one-time-delay/74389/14 "2023-01-31T10:46:47Z")

</div>

This post has a suggestion which may be what you are looking for

> [@Just First message delay only](https://discourse.nodered.org/t/just-first-message-delay-only/51677):
>
> Hi, I just want to delay the first message for a certain amount of time. How can I do it? Subsequent messages should arrive without delay. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [31 January 2023 11:21 UTC](https://discourse.nodered.org/t/one-time-delay/74389/15 "2023-01-31T11:21:38Z")

</div>

> [@Colin](#):
>
> This post has a suggestion which may be what you are looking for

Not only that but _this_ post has a suggestion that will delay initial messages[s] until 10 seconds have elapsed and pass messages received ater 10s without delay.

---

<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:** [31 January 2023 11:26 UTC](https://discourse.nodered.org/t/one-time-delay/74389/16 "2023-01-31T11:26:56Z")

</div>

Yes, @jbudd's suggestion earlier should also do what you want.

---

<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:** [1 April 2023 11:27 UTC](https://discourse.nodered.org/t/one-time-delay/74389/17 "2023-04-01T11:27:02Z")

</div>

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