# Inject triggers only once?

**URL:** <https://discourse.nodered.org/t/inject-triggers-only-once/61301>\
**Category:** General\
**Created:** [14 April 2022 17:17 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301 "2022-04-14T17:17:21Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [14 April 2022 17:17 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/1 "2022-04-14T17:17:22Z")

</div>

I have **inject** node which should trigger every day 23:59, but it triggers only once.

```auto
[{"id":"ed7e17df32d773b0","type":"inject","z":"f89c8950.ff2658","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"59 23 * * *","once":false,"onceDelay":0.1,"topic":"Keskiyo","payload":"1","payloadType":"num","x":470,"y":800,"wires":[["696b2bbf4741ee1b","49ad6418653572c7"]]}]

```

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [14 April 2022 17:24 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/2 "2022-04-14T17:24:58Z")

</div>

It looks like it is setup correctly, you mat want to check the rest of your flow, to see if the problem is there.

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [14 April 2022 17:30 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/3 "2022-04-14T17:30:20Z")

</div>

How the following nodes could affect the previous nodes (i.e. inject node)

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [14 April 2022 17:36 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/4 "2022-04-14T17:36:27Z")

</div>

I'm not aware of any issues with inject node, I use them in the same way as you and have not had any issues. So I'm suggesting that perhaps it is working but the flow is wrong ?

Put a debug node on the output of the inject node, so you can see what is being sent and when.

Just to state the obvious you know you will only get 1 message each day ?

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [14 April 2022 17:51 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/5 "2022-04-14T17:51:13Z")

</div>

I have the debug node after inject, it shows that it is triggered once

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [14 April 2022 18:09 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/6 "2022-04-14T18:09:37Z")

</div>

So you have left the debug window open for more than 1 day, without clearing or filtering any messages etc ?

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [14 April 2022 18:31 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/7 "2022-04-14T18:31:40Z")

</div>

yes, exactly

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [14 April 2022 18:37 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/8 "2022-04-14T18:37:44Z")

</div>

The debug can clear after a while if other debug messages in other flows cause its buffer to become full.

So it is very easy to imagine it not being there the following morning.

Add system console to the debug node and then check the log after 2 cycles

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

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

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [14 April 2022 18:46 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/9 "2022-04-14T18:46:23Z")

</div>

Other debugging - add node-red-contrib-simpletime and tick

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

and change debug node to  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e4189726dcda120fed91ef1b3b8200afac81af47.png)

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

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [14 April 2022 18:59 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/10 "2022-04-14T18:59:51Z")

</div>

If this were a common problem it would have been seen already.  
So its likley something to do with your system.

Can you detail

Platform  
OS / version  
NODE version  
NODE RED version  
Anything else that may be unusual...?

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [15 April 2022 09:49 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/11 "2022-04-15T09:49:54Z")

</div>

Thanks, I put this on

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [15 April 2022 09:54 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/12 "2022-04-15T09:54:34Z")

</div>

Running on Raspberry PI 4 with 8GB menory

Node-RED version: v2.1.4  
Node.js version: v12.22.7  
Linux 5.10.63-v7+ arm LE

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 April 2022 04:44 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/13 "2022-04-19T04:44:59Z")

</div>

Sorry - completely forgot about this one - mine seem to repeatably trigger each day according to console and status display for yesterday

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

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

So I think its just the debug tab clearing itself overnight if nothing in it in the morning for you

---

<div class="post-metadata">

**Author:** ![fugit185](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fugit185](https://discourse.nodered.org/u/fugit185)\
**Post date:** [29 April 2022 17:26 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/14 "2022-04-29T17:26:31Z")

</div>

I noticed something interesting, I put other trigger to **11:59** , i.e. not **23.59** and now I get daily message at 11:59 AM

> 4/29/2022, 11:58:59 AM[node: Keskiyö](http://192.168.50.18:1880/#)msg.payload : number  
> 1651222740001

So how to change it to 11:59 PM?

---

<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:** [28 June 2022 17:26 UTC](https://discourse.nodered.org/t/inject-triggers-only-once/61301/15 "2022-06-28T17:26:58Z")

</div>

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