# \[Solved\] "Delayed" message creation using the delay node

**URL:** https://discourse.nodered.org/t/solved-delayed-message-creation-using-the-delay-node/7415
**Category:** General
**Created:** [31 January 2019 01:57 UTC](https://discourse.nodered.org/t/solved-delayed-message-creation-using-the-delay-node/7415 "2019-01-31T01:57:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [31 January 2019 01:57 UTC](https://discourse.nodered.org/t/solved-delayed-message-creation-using-the-delay-node/7415/1 "2019-01-31T01:57:44Z")

</div>

Sorry folks, this is a new one which has just presented itself to me:

The `delay` node is nide if I want to send a second message a time after the first message is received.

Here's the catch:

Say I want to create a chain of message from an input?  
Explanation:  
"message"/trigger received.  
Message 1 sent.  
(delay 'n' seconds)  
Message 2 sent.  
(delay 'm' seconds)  
Message 3 sent  
.  
.  
.  
and so on.

I am not going to specify a number of repeats, but I hope you get the idea.

I'm playing with the `delay` node but I'm missing something.

Code for looking:

```auto
[{"id":"71543c1d.99057c","type":"trigger","z":"baf80d2f.6bd538","op1":"1","op2":"2","op1type":"num","op2type":"num","duration":"1","extend":false,"units":"s","reset":"","bytopic":"all","name":"Dusk/Night","x":290,"y":4140,"wires":[["950ed433.63bc18","6c43cf50.11bc4"]]},{"id":"347b2ba5.627644","type":"inject","z":"baf80d2f.6bd538","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":4140,"wires":[["71543c1d.99057c"]]},{"id":"950ed433.63bc18","type":"debug","z":"baf80d2f.6bd538","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","x":430,"y":4080,"wires":[]},{"id":"6c43cf50.11bc4","type":"trigger","z":"baf80d2f.6bd538","op1":"","op2":"3","op1type":"pay","op2type":"num","duration":"4","extend":true,"units":"s","reset":"","bytopic":"all","name":"Dusk/Night","x":460,"y":4140,"wires":[["e91bbb38.384a6","a8ace34a.a075"]]},{"id":"e91bbb38.384a6","type":"debug","z":"baf80d2f.6bd538","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","x":600,"y":4080,"wires":[]},{"id":"a8ace34a.a075","type":"trigger","z":"baf80d2f.6bd538","op1":"","op2":"4","op1type":"pay","op2type":"num","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"Dusk/Night","x":640,"y":4140,"wires":[["211ad58e.ed0502"]]},{"id":"211ad58e.ed0502","type":"debug","z":"baf80d2f.6bd538","name":" *********Output************","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","x":600,"y":4200,"wires":[]}]

```

` *****output****** ` is the node of interest.  
I have the other output nodes while trying to get it working.

But it doesn't seem to be doing what I want.

Sorry for not getting it.  
Anyone?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [31 January 2019 02:11 UTC](https://discourse.nodered.org/t/solved-delayed-message-creation-using-the-delay-node/7415/2 "2019-01-31T02:11:28Z")

</div>

SOLVED.

Sorry.

I was not thinking laterally enough.

This config works:

```auto
[{"id":"71543c1d.99057c","type":"trigger","z":"baf80d2f.6bd538","op1":"1","op2":"2","op1type":"num","op2type":"num","duration":"1","extend":false,"units":"s","reset":"","bytopic":"all","name":"Dusk/Night","x":140,"y":4220,"wires":[["950ed433.63bc18","211ad58e.ed0502"]]},{"id":"347b2ba5.627644","type":"inject","z":"baf80d2f.6bd538","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":4140,"wires":[["71543c1d.99057c","6c43cf50.11bc4","a8ace34a.a075"]]},{"id":"6c43cf50.11bc4","type":"trigger","z":"baf80d2f.6bd538","op1":"","op2":"3","op1type":"nul","op2type":"num","duration":"4","extend":true,"units":"s","reset":"","bytopic":"all","name":"Dusk/Night","x":140,"y":4270,"wires":[["e91bbb38.384a6","211ad58e.ed0502"]]},{"id":"a8ace34a.a075","type":"trigger","z":"baf80d2f.6bd538","op1":"","op2":"4","op1type":"nul","op2type":"num","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"Dusk/Night","x":140,"y":4320,"wires":[["211ad58e.ed0502"]]},{"id":"211ad58e.ed0502","type":"debug","z":"baf80d2f.6bd538","name":" *********Output************","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","x":500,"y":4320,"wires":[]}]

```

But I am open to other ways too.
