# Inject Node does not Trigger

**URL:** <https://discourse.nodered.org/t/inject-node-does-not-trigger/62552>\
**Category:** General\
**Created:** [12 May 2022 08:36 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552 "2022-05-12T08:36:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gawan](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@Gawan](https://discourse.nodered.org/u/Gawan)\
**Post date:** [12 May 2022 08:36 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/1 "2022-05-12T08:36:11Z")

</div>

Hi,

I am using an "Inject" Node to trigger a time-based event.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d629c0d1a22098abf9fe5825e668581c6579ad8c.png)

But nothing happens at 10:30.

If I read the actual time in a function node: var now = new Date().getTime();  
it shows the right MESZ 10:30

but the inject does not trigger ...

BR  
Gawan

---

<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:** [12 May 2022 08:52 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/2 "2022-05-12T08:52:42Z")

</div>

What time and timezone is set on the computer where node-red runs (not the browser, the node-red backend)?

PS, what node-red and node-js version are you runnung? and is this a direct/os install or docker or other?

---

<div class="post-metadata">

**Author:** ![Gawan](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@Gawan](https://discourse.nodered.org/u/Gawan)\
**Post date:** [12 May 2022 08:58 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/3 "2022-05-12T08:58:56Z")

</div>

I do not know - this is a Synology Docker installation and I have no access to it.

Is there a way to use the same Time-Information like Date().getTime() for my trigger ?

---

<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:** [12 May 2022 10:05 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/4 "2022-05-12T10:05:34Z")

</div>

In a function node...

```auto
const now = new Date();
const now_ts = now.valueOf();
const now_local = now.toLocaleString();
const now_iso = now.toISOString();
const now_utc = now.toUTCString();
const offset = now.getTimezoneOffset();
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
node.warn({tz, offset, now, now_ts, now_local, now_iso, now_utc})

```

What do you see in debug sidebar when the function is triggered?

---

<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:** [12 May 2022 10:08 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/5 "2022-05-12T10:08:18Z")

</div>

> [@Steve-Mcl](#):
>
> PS, what node-red and node-js version are you runnung? and is this a direct/os install or docker or other?

What does it say in the node-red hamburger menu (top right menu button)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b3795a297339223f4361f72ab564d62ae4940533.png)

---

<div class="post-metadata">

**Author:** ![Gawan](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@Gawan](https://discourse.nodered.org/u/Gawan)\
**Post date:** [12 May 2022 10:20 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/6 "2022-05-12T10:20:45Z")

</div>

here it says v 1.1.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:** [12 May 2022 10:26 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/7 "2022-05-12T10:26:58Z")

</div>

ok, so that is a very old version of node-red & uses a now unsupported version of `cron` for scheduling events.

I recommend you install latest version (2.2.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:** [12 May 2022 10:28 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/8 "2022-05-12T10:28:51Z")

</div>

PS, see how you get a notification when I reply to you?

If you dont use the reply button next to my message, I have no idea you have replied to me.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/d/ed42496a03d77b3615286c8e9763d0de029c1818.png)

---

<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 July 2022 17:54 UTC](https://discourse.nodered.org/t/inject-node-does-not-trigger/62552/9 "2022-07-01T17:54:03Z")

</div>

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