# Cron+ vs Inject node - question

**URL:** https://discourse.nodered.org/t/cron-vs-inject-node-question/93948
**Category:** General
**Created:** [17 December 2024 08:13 UTC](https://discourse.nodered.org/t/cron-vs-inject-node-question/93948 "2024-12-17T08:13:41Z")
**Posts on this page:** 6
**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: [17 December 2024 08:13 UTC](https://discourse.nodered.org/t/cron-vs-inject-node-question/93948/1 "2024-12-17T08:13:41Z")

</div>

I use `cron+` a bit and am curious if there is a benefit to using it in this scenario:  
Two dates in a year.  
One to _turn off_ and one to _turn on_.

Would two `inject` nodes be better or one `cron+` node?

---

<div class="post-metadata">

### Author: ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)
#### Post date: [17 December 2024 08:30 UTC](https://discourse.nodered.org/t/cron-vs-inject-node-question/93948/2 "2024-12-17T08:30:38Z")

</div>

> [@Trying\_to\_learn](#):
>
> Two dates in a year.

I wasn't aware that you could specify dates in inject? You can only specify day of the week (e.g. every monday at 11am) and time with an inject node. With cron+ you can specify a date, i.e. 12th of december 2025 at 11am.

I don't understand how an inject node could even fulfil the requirements.

---

<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: [17 December 2024 08:32 UTC](https://discourse.nodered.org/t/cron-vs-inject-node-question/93948/3 "2024-12-17T08:32:02Z")

</div>

Since node-red V3, under the hood, they both use the same Cron lib.

Performance wise: zero difference.

Visual difference: Cron node can do both schedules from one node and will display what time that occurs in its status.

Bottom line: if you already have cron-plus installed, use it or don't use it. If you don't already have cron-plus installed, just use inject 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: [17 December 2024 08:34 UTC](https://discourse.nodered.org/t/cron-vs-inject-node-question/93948/4 "2024-12-17T08:34:06Z")

</div>

@gregorius  
How right you are.

Oooops.

Well I guess that answers that question.

@Steve-Mcl  
When I open the `inject` node in 3.1.1 I don't see a way to set a date.

But thanks.

---

<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: [17 December 2024 08:37 UTC](https://discourse.nodered.org/t/cron-vs-inject-node-question/93948/5 "2024-12-17T08:37:58Z")

</div>

> [@Trying\_to\_learn](#):
>
> @Steve-Mcl  
> When I open the `inject` node in 3.1.1 I don't see a way to set a date

I missed the small fact you were talking about dates. No, you cannot set dates in the inject node. But under the hood they do use the same library.

---

<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: [31 December 2024 08:38 UTC](https://discourse.nodered.org/t/cron-vs-inject-node-question/93948/6 "2024-12-31T08:38:20Z")

</div>

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