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

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

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

Or the basic inject node in interval between times mode

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

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

2 Likes

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

It DOES work like what you say :slight_smile:

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 :slight_smile:
image

2 Likes

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

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 :slight_smile:

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}

1 Like

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