# Delay Node Stacking problem

**URL:** <https://discourse.nodered.org/t/delay-node-stacking-problem/80198>\
**Category:** General\
**Created:** [1 August 2023 01:56 UTC](https://discourse.nodered.org/t/delay-node-stacking-problem/80198 "2023-08-01T01:56:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [1 August 2023 01:56 UTC](https://discourse.nodered.org/t/delay-node-stacking-problem/80198/1 "2023-08-01T01:56:46Z")

</div>

I currently have a message delay set for 2 minutes.in a "Delay Node". I've noticed that if a second message hits the delay input prior to the 2 minute delay, the second message is stacked. The first message completes it's 2 minute delay and is output, The second message is then output after it's 2 minute delay.

Rather then having messages stacked I would like to see the first message start the 2 minute delay, and all subsequent messages keep resetting the 2 minute delay until the 2 minute delay can complete outputting the first message. Is it possible to reconfigure the delay to stop the message stacking?

X.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [1 August 2023 02:20 UTC](https://discourse.nodered.org/t/delay-node-stacking-problem/80198/2 "2023-08-01T02:20:52Z")

</div>

I think you want the trigger node then.

```auto
[
    {
        "id": "b0f2e9d9bd632950",
        "type": "inject",
        "z": "be14baae.1728",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 570,
        "y": 3120,
        "wires": [
            [
                "694a36c65044e905"
            ]
        ]
    },
    {
        "id": "ba2b7ea1c669fc15",
        "type": "debug",
        "z": "be14baae.1728",
        "name": "debug 321",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 950,
        "y": 3120,
        "wires": []
    },
    {
        "id": "694a36c65044e905",
        "type": "trigger",
        "z": "be14baae.1728",
        "name": "",
        "op1": "",
        "op2": "",
        "op1type": "nul",
        "op2type": "pay",
        "duration": "2",
        "extend": false,
        "overrideDelay": false,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 735,
        "y": 3120,
        "wires": [
            [
                "ba2b7ea1c669fc15"
            ]
        ]
    }
]

```

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [1 August 2023 02:28 UTC](https://discourse.nodered.org/t/delay-node-stacking-problem/80198/3 "2023-08-01T02:28:21Z")

</div>

smcgann99 you're right. Just looked at the "Trigger Node" and it looks like it will do the job. I need to rearrange my nodes; I had a function node sending a message to the delay. Now I need to have the trigger-node activate the function node.

Thanks again, X (formerly Twitter, just kidding lol)

UPDATE: It works and I eliminated the Function Node; the Trigger outputs the string.

---

<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:** [15 August 2023 02:29 UTC](https://discourse.nodered.org/t/delay-node-stacking-problem/80198/4 "2023-08-15T02:29:19Z")

</div>

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