How to repeat workflow on the basis of monthly and quarterly


I want to execute(repeat) workflow on the basis of monthly i.e first of every month and quarterly i.e every 3 months.
How to set repeat functionality of inject node for above query.
Please help out for above query.

Thank you!

node-red-contrib-cron-plus node can do that...


Try also node-red-contrib-bigtimer, if you want alternative to cron-plus


can you please share cron for quarterly.

the cron that you have used is not working for me

there is a cron builder / helper...
that gives you...

Here is 1st monday every 3 month
0 0 0 ? 1/3 MON#1 *

Here is last friday every 3 month at 2am
0 0 2 ? 1/3 FRIL *

what is the time zone of inject node to repeat workflow at specific time functionality?

Its documented in the built in help.

Typically, if your node-red server is setup to the same timezone as when you expect events to occur - leave it blank.

However if your node-red server was in Brazil and you wanted the execution to accur at UK times, then you can either calculate the time offset OR enter a timezone of London and it will auto offset to occur at the time you entered (with reference to the location specified)

Can we declare variable in cron-plus node?
If yes, how to declare?

What do you mean? The output payload? Using a variable for the CRON expression? For something else? What kind of variable (flow/global cntext? a msg property?)

Please explain.

In inject node we can declare variable using msg. keyword and can use that variable within whole workflow.

Same as inject node can we declare variable in cron-plus node?

Refer below snap for inject node variable:

You can put anything in any one property.

If that is not enough, put a change node after it.

1 Like

So we cannot declare multiple property?

You can declare as many properties as you wish but it must be contained in one object or array property of msg.

You can also use a jsonata expression to create dynamic values. You can use environment, variables or flow variables or global variables. Again, they must all be in one property of the message object.

If that is not enough then use a change node after the cron node. The change node is almost identical to the injector mode where you can set as many properties as you like.

Lastly, if you must, you can use a function node to extract all of the properties from a single property and push them into the message object therefore making it dynamic.

Your options are limited only by your capability or imagination :slight_smile:

I want to use edsId variable that is returned from function node in response node.
Please help me how to use it?

I would use node-red-contrib-simpletime then in a switch node filter on when you want to run.

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