# Function Node on start not sending message

**URL:** <https://discourse.nodered.org/t/function-node-on-start-not-sending-message/88569>\
**Category:** General\
**Tags:** function-node\
**Created:** [9 June 2024 04:01 UTC](https://discourse.nodered.org/t/function-node-on-start-not-sending-message/88569 "2024-06-09T04:01:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 June 2024 05:41 UTC](https://discourse.nodered.org/t/function-node-on-start-not-sending-message/88569/2 "2024-06-09T05:41:53Z")

</div>

> [@DustyButler](#):
>
> node.send() does not send anything

It does, but it is dependant on order of creation and other factors. Read this: [Messages sent via "On Start" only reliable on partial deploy but not during " nodered.service" start. Possible? - #7 by Steve-Mcl](https://discourse.nodered.org/t/messages-sent-via-on-start-only-reliable-on-partial-deploy-but-not-during-nodered-service-start-possible/83989/7)

> [@DustyButler](#):
>
> return msg; gives a "ReferenceError: msg is not defined"

As I would expect. The function will not have received an input msg, so it does not exist. (On start is the start of it's life's time & has never received a message)

---

_[View the full topic](https://discourse.nodered.org/t/function-node-on-start-not-sending-message/88569)._
