# How to repeat workflow on the basis of monthly and quarterly

**URL:** <https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733>\
**Category:** General\
**Created:** [15 September 2022 06:28 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733 "2022-09-15T06:28:42Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiliH](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MiliH](https://discourse.nodered.org/u/MiliH)\
**Post date:** [15 September 2022 06:28 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/1 "2022-09-15T06:28:42Z")

</div>

Hello  
Greetings!

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!

---

<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:** [15 September 2022 06:34 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/2 "2022-09-15T06:34:13Z")

</div>

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/603cd230e1b605a831d99f58cfc5d0bcb9615509.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/2/92ea078c2ffac25fdb63085f8719fae0d92aa4a1.png)

---

<div class="post-metadata">

**Author:** ![linuxtrap](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/linuxtrap/32/60289_2.png) [@linuxtrap](https://discourse.nodered.org/u/linuxtrap)\
**Post date:** [15 September 2022 07:09 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/3 "2022-09-15T07:09:46Z")

</div>

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

pøt

---

<div class="post-metadata">

**Author:** ![MiliH](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MiliH](https://discourse.nodered.org/u/MiliH)\
**Post date:** [15 September 2022 07:19 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/4 "2022-09-15T07:19:45Z")

</div>

can you please share cron for quarterly.

the cron that you have used is not working for me

---

<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:** [15 September 2022 07:31 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/5 "2022-09-15T07:31:30Z")

</div>

there is a cron builder / helper...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/1/e10cfe2f7d6707fcf9b35df734d55603711c7a20.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e8e82742fec8166434f37dc0b5873fea84f437b.png)  
that gives you...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fd4068c8b26c092adc24fea37ad2391a83fe860d.png)

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 *`

---

<div class="post-metadata">

**Author:** ![MiliH](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MiliH](https://discourse.nodered.org/u/MiliH)\
**Post date:** [15 September 2022 08:36 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/6 "2022-09-15T08:36:27Z")

</div>

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

---

<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:** [15 September 2022 11:00 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/7 "2022-09-15T11:00:13Z")

</div>

> [@MiliH](#):
>
> what is the time zone of inject node to repeat workflow at specific time

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)

---

<div class="post-metadata">

**Author:** ![MiliH](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MiliH](https://discourse.nodered.org/u/MiliH)\
**Post date:** [15 September 2022 12:21 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/8 "2022-09-15T12:21:53Z")

</div>

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

---

<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 September 2022 07:58 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/9 "2022-09-16T07:58:41Z")

</div>

> [@MiliH](#):
>
> Can we declare variable in cron-plus node?

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.

---

<div class="post-metadata">

**Author:** ![MiliH](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MiliH](https://discourse.nodered.org/u/MiliH)\
**Post date:** [16 September 2022 08:39 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/10 "2022-09-16T08:39:09Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5a767a27e7bc97dee68125883ef0e7788dbcc593.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 September 2022 08:43 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/11 "2022-09-16T08:43:20Z")

</div>

You can put anything in any one property.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/01a80b2c6b61ad2bf591893f85389e15bd9d2b54.png)

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

---

<div class="post-metadata">

**Author:** ![MiliH](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MiliH](https://discourse.nodered.org/u/MiliH)\
**Post date:** [16 September 2022 09:26 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/12 "2022-09-16T09:26:50Z")

</div>

> [@Steve-Mcl](#):
>
> .

So we cannot declare multiple property?

---

<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 September 2022 09:31 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/13 "2022-09-16T09:31:34Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![MiliH](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@MiliH](https://discourse.nodered.org/u/MiliH)\
**Post date:** [20 September 2022 13:12 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/14 "2022-09-20T13:12:45Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/84a2d5dc03df84974b2041f29497a70727b6fb14.png)

---

<div class="post-metadata">

**Author:** ![mrdvt92](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrdvt92/32/33122_2.png) [@mrdvt92](https://discourse.nodered.org/u/mrdvt92)\
**Post date:** [21 September 2022 00:46 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/15 "2022-09-21T00:46:32Z")

</div>

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

---

<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:** [5 October 2022 00:47 UTC](https://discourse.nodered.org/t/how-to-repeat-workflow-on-the-basis-of-monthly-and-quarterly/67733/16 "2022-10-05T00:47:20Z")

</div>

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