# Trigger node not accepting msg.delay

**URL:** https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096
**Category:** General
**Created:** [14 July 2022 13:33 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096 "2022-07-14T13:33:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Jsimon003](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jsimon003](https://discourse.nodered.org/u/Jsimon003)
#### Post date: [14 July 2022 13:33 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096/1 "2022-07-14T13:33:31Z")

</div>

Unsure what i'm doing wrong but i'm trying to set the delay of the trigger node to 1ms so the next message is passed through

```auto
[{"id":"f39a44549a9aa1b8","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"d8e0bd9de0330542","type":"inject","z":"f39a44549a9aa1b8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"test","payloadType":"str","x":270,"y":220,"wires":[["19fa46576386dcd8"]]},{"id":"fe51ae5f41686824","type":"inject","z":"f39a44549a9aa1b8","name":"","props":[{"p":"payload"},{"p":"delay","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"test1","payloadType":"str","x":270,"y":300,"wires":[["19fa46576386dcd8"]]},{"id":"7ba2bbbd8f81a764","type":"debug","z":"f39a44549a9aa1b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":710,"y":280,"wires":[]},{"id":"19fa46576386dcd8","type":"trigger","z":"f39a44549a9aa1b8","name":"","op1":"","op2":"","op1type":"pay","op2type":"payl","duration":"10","extend":false,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":470,"y":280,"wires":[["7ba2bbbd8f81a764"]]}]

```

---

<div class="post-metadata">

### Author: ![mickym2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mickym2/32/36128_2.png) [@mickym2](https://discourse.nodered.org/u/mickym2)
#### Post date: [14 July 2022 13:47 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096/2 "2022-07-14T13:47:04Z")

</div>

If you look to the description of the trigger node - then msg.delay contains the delay in milliseconds. 1 ms however is a way to short that this can be handeled. in my opinion you should use at least 250ms.

---

<div class="post-metadata">

### Author: ![Jsimon003](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jsimon003](https://discourse.nodered.org/u/Jsimon003)
#### Post date: [14 July 2022 17:24 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096/4 "2022-07-14T17:24:32Z")

</div>

i wish they would put a minimum value in the description for trigger and delay so i wouldn't have to trial and error. This still did not work.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [14 July 2022 17:30 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096/5 "2022-07-14T17:30:20Z")

</div>

In theory there is no minimum (0) but of course there is hardware, operating system, other apps, etc that all add something

---

<div class="post-metadata">

### Author: ![Jsimon003](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jsimon003](https://discourse.nodered.org/u/Jsimon003)
#### Post date: [14 July 2022 17:50 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096/7 "2022-07-14T17:50:50Z")

</div>

So far I've tried 1ms, 250ms, 1000ms, 4000ms and still does not work. msg.delay does work with the delay node though

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [14 July 2022 18:24 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096/8 "2022-07-14T18:24:43Z")

</div>

The trigger node will not override the previous payload trigger on a new message with a shorter delay.

If you want that function try this

```auto
[{"id":"6d572678.76f75","type":"inject","z":"f39a44549a9aa1b8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"test","payloadType":"str","x":250,"y":40,"wires":[["a0b8a98c.20d12"]]},{"id":"a0b8a98c.20d12","type":"switch","z":"f39a44549a9aa1b8","name":"","property":"reset","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":420,"y":60,"wires":[["a39402cc.ecc9d","1c1dcbde.523c74"],["1c1dcbde.523c74"]]},{"id":"7acdf5dc.7ae06c","type":"inject","z":"f39a44549a9aa1b8","name":"","props":[{"p":"payload"},{"p":"reset","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"test1","payloadType":"str","x":250,"y":120,"wires":[["a0b8a98c.20d12"]]},{"id":"a39402cc.ecc9d","type":"debug","z":"f39a44549a9aa1b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":40,"wires":[]},{"id":"1c1dcbde.523c74","type":"trigger","z":"f39a44549a9aa1b8","name":"","op1":"","op2":"","op1type":"pay","op2type":"payl","duration":"10","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":80,"wires":[["a39402cc.ecc9d"]]}]

```

---

<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: [12 September 2022 18:25 UTC](https://discourse.nodered.org/t/trigger-node-not-accepting-msg-delay/65096/9 "2022-09-12T18:25:14Z")

</div>

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