# What timer node do I need to trigger at every 5 min past the hour

**URL:** <https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935>\
**Category:** General\
**Created:** [16 November 2023 16:38 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935 "2023-11-16T16:38:04Z")\
**Posts on this page:** 11\
**Page:** 1

<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:** [16 November 2023 16:38 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/1 "2023-11-16T16:38:04Z")

</div>

i.e  
every 5 mins on the clock 5 minute markers

---

<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:** [16 November 2023 16:56 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/2 "2023-11-16T16:56:31Z")

</div>

node-red-contrib-cron-plus looks like the jobby

---

<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:** [16 November 2023 17:32 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/3 "2023-11-16T17:32:00Z")

</div>

Or the basic inject node in interval between times mode

---

<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:** [16 November 2023 17:34 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/4 "2023-11-16T17:34:22Z")

</div>

That didn't seemed to do what I wanted - AFAICT it goes off every 5 mins from when you set it going rather than every 5 min clock interval

I'll test it out again

---

<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:** [16 November 2023 17:35 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/5 "2023-11-16T17:35:40Z")

</div>

Interval mode does that. Interval between times mode does 5 mins past the hour etc. ( as it uses cron under the covers)

---

<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:** [16 November 2023 17:36 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/6 "2023-11-16T17:36:49Z")

</div>

That's the mode I tried out - retesting it now to see when next event trigger

---

<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:** [16 November 2023 17:42 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/7 "2023-11-16T17:42:00Z")

</div>

It DOES work like what you say 🙂

grrr-just spent the past 30 mins trying to santise the cron-plus output #LOL

Plus I've just realised that the computer the node is running on isn't the same computer as I'm editing on and their clocks are different!

Perfect now 🙂  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bc19763df0843b7fc226bf2bf603fd025a8afd70.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:** [16 November 2023 20:45 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/8 "2023-11-16T20:45:30Z")

</div>

> [@cymplecy](#):
>
> -just spent the past 30 mins trying to santise the cron-plus output #LOL

You realise that corn-plus can output whatever payload you desire?

---

<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:** [16 November 2023 21:01 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/9 "2023-11-16T21:01:12Z")

</div>

Well, (and remember I've failed once today already) I couldn't get it to stop adding in additional unwanted properties to the message.

I just wanted msg.flush = true and nothing else

But all moot as basic inject does the job 🙂

---

<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:** [17 November 2023 09:46 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/10 "2023-11-17T09:46:21Z")

</div>

Just a note of warning, if you are running node-red on a pi, or similar, that does not have an on-board clock, and you are connecting to the network using wifi then the inject node running in this mode may lose its sync to real time because the clock is not setup until after the network connects, so node-red is up and running before the clock is set. If that is the case then you need to take action to stop node-red starting until after the clock is synchronised. In which case it would probably be easier to use cron-plus. If you want to generate a message with just flush: true, you can do that in a single line function node using  
`return {flush: true}`

---

<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:** [1 December 2023 09:46 UTC](https://discourse.nodered.org/t/what-timer-node-do-i-need-to-trigger-at-every-5-min-past-the-hour/82935/11 "2023-12-01T09:46:28Z")

</div>

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