# Trigger node time settable through message

**URL:** <https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366>\
**Category:** Feature Requests\
**Created:** [26 September 2020 06:04 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366 "2020-09-26T06:04:05Z")\
**Posts on this page:** 18\
**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:** [26 September 2020 06:04 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/1 "2020-09-26T06:04:06Z")

</div>

# I am sure it has been brought up before - and even by me.

But I am now finding more and more cases where I need to control the `trigger` node's time via messages or context. (Your choice which at this stage)

But I am slightly off put that the `delay` node can be controlled by message data but not the `trigger` node.

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [26 September 2020 08:06 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/2 "2020-09-26T08:06:03Z")

</div>

Do you want a node that triggers a message at a certain time of the day (only once or every day) ?  
... or after some time the flow is deployed/started ?

---

<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:** [26 September 2020 08:08 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/3 "2020-09-26T08:08:35Z")

</div>

I'm using the `trigger` node as a _Watchdog_ kind of thing.

If it gets a message, it is happy.

If it doesn't get another message in a certain amount of time, it _times out_ and sends a message.

But that time can vary, so it would be nice if that could be set in the message.

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [26 September 2020 08:17 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/4 "2020-09-26T08:17:33Z")

</div>

Maybe by searching on [timeout in the flows library](https://flows.nodered.org/search?term=timeout&type=node&type=flow&type=collection) you might find the node/flow you need:

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [26 September 2020 08:19 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/5 "2020-09-26T08:19:55Z")

</div>

Also checkout [https://flows.nodered.org/node/node-red-contrib-countdown](https://flows.nodered.org/node/node-red-contrib-countdown)

---

<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:** [26 September 2020 08:20 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/6 "2020-09-26T08:20:25Z")

</div>

Yeah, but I've just had a new hole ripped in me for not using **core nodes**.

So I seem to be stuck between a rock and hard place.

I have a few foreign _timeout_ nodes and the population is slowly growing.

I'd prefer to not have too many that are used for vague _one time_ needs when I think the request isn't too much.

---

<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:** [26 September 2020 08:23 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/7 "2020-09-26T08:23:20Z")

</div>

> [@janvda](#):
>
> Also checkout [node-red-contrib-countdown (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-countdown)

How do I change the time on this node?

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [26 September 2020 08:28 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/8 "2020-09-26T08:28:11Z")

</div>

> [@Trying\_to\_learn](#):
>
> How do I change the time on this node?

Good question. Looking at the issue it might indeed not be possible:

- [Inconsistent documents. · Issue #8 · ontje/node-red-contrib-countdown · GitHub](https://github.com/ontje/node-red-contrib-countdown/issues/8)

---

<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:** [26 September 2020 08:35 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/9 "2020-09-26T08:35:46Z")

</div>

@Trying_to_learn thanks for the suggestion for the Trigger node. It sounds like something we should support, given we can do it in the Delay node. There may be some reason we don't do it that I can't think of this early on a Saturday morning. But I will discuss it with @dceejay and add it to the backlog.

---

<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:** [26 September 2020 08:37 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/10 "2020-09-26T08:37:44Z")

</div>

Thanks Nic. I can only ask.

I have about 8 _timeout/trigger_ nodes and none of them do it.

I know this may be trivial, but it just seems I am being swamped with things that need that functionality just now.

Maybe I should make my own node, but I don't think I have the skills to do that just yet.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 September 2020 08:38 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/11 "2020-09-26T08:38:16Z")

</div>

> [@Trying\_to\_learn](#):
>
> I've just had a new hole ripped in me for not using **core nodes**.

If you mean me I wasn't saying you shouldn't use core nodes, but when you have a specific problem you are asking about here then you should simplify that right down to what the problem actually is and not complicate it with surrounding logic, which may or may not include non-core nodes.

---

<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:** [26 September 2020 08:41 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/12 "2020-09-26T08:41:34Z")

</div>

Colin, I agree with what you say.

I (now) have about 4 sets of the code to do this and remembering which is which is painful for me.

I isolate the sections with the `fan` node as I explained the reasons how/why I do it.

Then I need to be able to . . . . . . . . .

We are off topic.

But I hope you can understand sometimes it is just painful to make **another** copy so allow exporting to show people.

I try to not include them, but.... Sometimes it happens, Sorry,

---

<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:** [26 September 2020 08:45 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/14 "2020-09-26T08:45:38Z")

</div>

(ARGH!)

Thanks for the suggestion/s.

I have some/most of them and none of them do what I need.

Such is life.

But thanks all the same.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 September 2020 08:50 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/15 "2020-09-26T08:50:47Z")

</div>

Yes changing the time to be a typed input that defaults to a numeric looks like a great first contribution for someone if they would like to step up. It is almost Hacktoberfest after all

---

<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:** [26 September 2020 08:55 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/16 "2020-09-26T08:55:38Z")

</div>

Sorry, so does that mean it can/will be done or it is too much of a hack to justify the time/effort?

---

<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:** [26 September 2020 09:08 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/17 "2020-09-26T09:08:39Z")

</div>

> [@Trying\_to\_learn](#):
>
> does that mean it can/will be done

It means it could be done. It just needs someone to do it.

If someone is out there who is wanting to start contributing to node-red, but not sure where to start, this would been a fairly straightforward first feature to work on. Just let us know.

Otherwise it will sit on the backlog to be prioritized against all the other work we have.

---

<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:** [26 September 2020 09:10 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/18 "2020-09-26T09:10:19Z")

</div>

OK.

I may dig into the node's code.

I'll see what I can do. I only have 2 weeks then I am (again) being thrown into _the jungle_ for another 2 weeks (alternating) until the other things are done.  
But should be over by December.

---

<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:** [25 November 2020 09:10 UTC](https://discourse.nodered.org/t/trigger-node-time-settable-through-message/33366/19 "2020-11-25T09:10:24Z")

</div>

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