# Inject Node with fixed time does not work

**URL:** <https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925>\
**Category:** General\
**Created:** [14 June 2022 15:10 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925 "2022-06-14T15:10:48Z")\
**Posts on this page:** 12\
**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:** [14 June 2022 15:10 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/1 "2022-06-14T15:10:48Z")

</div>

Hey Guys,  
I am using an "inject" node with a fixed timing (like 17:08)

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

But if time goes by and it gets 17:08, nothing happens.  
If I click the inject button manually at 17:08:05 it triggers, but it does not work automatically.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/d/8d9bc6a1cdb522528bb7bd044dfc1289f33961e1.png)

Does anyone have an idea why ?

BR  
G

---

<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:** [14 June 2022 15:15 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/2 "2022-06-14T15:15:06Z")

</div>

I am using Node-Red 2.2.2

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [14 June 2022 15:18 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/3 "2022-06-14T15:18:42Z")

</div>

Can't answer your specific question but I can offer an alternative. Cron-plus node

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [14 June 2022 15:22 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/4 "2022-06-14T15:22:44Z")

</div>

It will be using the time setting of the device running Node-RED, which may not be the same as your local time. Try setting the time as UTC and see if that works.

---

<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:** [14 June 2022 15:27 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/5 "2022-06-14T15:27:24Z")

</div>

the issue seems to be that the server time and the debugger time is different

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

how can set it the "right" way ?

---

<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:** [14 June 2022 16:06 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/6 "2022-06-14T16:06:17Z")

</div>

is it possible to set the cron-plus node in a way, that it does NOT forward messages outside a given time horizon (e.g. 0600-1500) ?

---

<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:** [14 June 2022 17:01 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/7 "2022-06-14T17:01:09Z")

</div>

> [@Gawan](#):
>
> NOT forward messages outside a given time horizon (e.g. 0600-1500) ?

Depends what you need. for example `0 * 6-14 * * *` will fire every minute from 06:00~14:59

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/4/24675739dde4a4f1ac6bbfd7ad24c05c5bd045d6.png)

---

<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:** [14 June 2022 17:03 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/8 "2022-06-14T17:03:38Z")

</div>

Alternatively, you can fire a msg with topic "stop" or "start" and payload of "schedule-name" to dynamically enable/disable a schedule.

The options are all possible.

PS there is extensive built in help (help tab) and built in demos (`Ctrl-I` --\> examples)

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [15 June 2022 04:50 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/9 "2022-06-15T04:50:41Z")

</div>

Use the Within-time node and set it to the time to block certain messages (or allow) depending on your logic

Craig

---

<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:** [16 June 2022 13:15 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/10 "2022-06-16T13:15:22Z")

</div>

basically cron-plus looks like a good idea, but unfortunately it does not send its values in the payload, but in a object inside payload instead:

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

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

can I somehow change it ?  
is this a bug ? or a feature ?

---

<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:** [16 June 2022 19:12 UTC](https://discourse.nodered.org/t/inject-node-with-fixed-time-does-not-work/63925/11 "2022-06-16T19:12:02Z")

</div>

Is the debug attached directly to the output of the CRON+ node?

What you are showing suggests the payload has been altered downstream OR you have another schedule with "topic3" sending that value.

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46fc2e30ef9845c0f6228a218fe1aaefa37ccbe4.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-with-fixed-time-does-not-work/63925/12 "2022-07-01T17:54:03Z")

</div>

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