# How to detect specific dates (daylight savings) with cron+ node

**URL:** <https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793>\
**Category:** General\
**Created:** [3 October 2021 07:18 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793 "2021-10-03T07:18:24Z")\
**Posts on this page:** 7\
**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:** [3 October 2021 07:18 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793/1 "2021-10-03T07:18:24Z")

</div>

I know it should be easy, but I'm not that smart.

I want to get `cron+` (as an example) to tell me when 2 events happen.  
`Daylight Savings - Start` and `Daylight Savings - End`  
Starting: 02:00 First Sunday of October.  
End: 02:00 First Sunday of April.

The exact time is not essential.

This is the best I can do so far:  
`0 0 9 1,7 OCT SUN * `  
But that isn't showing me what I want in it's _decoder_ pop up.  
Its saying October 1 to 7 and on Sunday.  
😕  
06:00 would suffice. But I don't know how to make the _template_ to give that.

Thanks in advance.

OK, is this it?

```auto
[{"id":"7b296738.fd4788","type":"cronplus","z":"65c9b63cb09879a0","name":"Monthly","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"schedule1","payloadType":"str","payload":"SUMMER","expressionType":"cron","expression":"0 0 9 * OCT SUN#1 * ","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"schedule2","topic":"schedule2","payloadType":"str","payload":"NORMAL","expressionType":"cron","expression":"0 0 9 * APR SUN#1 * ","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":3420,"y":170,"wires":[[]]}]

```

Just want to check I understand it all.

---

<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:** [3 October 2021 07:57 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793/2 "2021-10-03T07:57:42Z")

</div>

> [@Trying\_to\_learn](#):
>
> I want to get `cron+` (as an example) to tell me when 2 events happen.  
> `Daylight Savings - Start` and `Daylight Savings - End`  
> Starting: 02:00 First Sunday of October.  
> End: 02:00 First Sunday of April.

`0 0 2 ? 10 SUN#1 *` - Starting: 02:00 First Sunday of October  
`0 0 2 ? 4 SUN#1 *` - End: 02:00 First Sunday of April.

There is an example that would get you close...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/2/424b0dfa2831abb50265e0a00fd4a8d92d86b272.png)

Also, there is the expression builder  
 ![UDu0D3Msjt](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aa007f4579d8abbceaccb2cea4572d08d5b526f8.gif)

---

<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:** [3 October 2021 08:07 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793/3 "2021-10-03T08:07:05Z")

</div>

Thanks.

In the node example I posted the `?` was a `*`.

Yet it says it will do the same....

Would you mind looking at the node I posted and check that - please.

Just to follow on that...

Watching your _movie_....

`easy expression maker`... Nice. But if I have the _basic_ thing I want and then click on it, I get a very different screen.  
(Ok, not your node - is it? - but that also is throwing me)

![Screenshot from 2021-10-03 19-11-36](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/1903d59cd475a5b2d8b0829f4dad976c35d5722a.png)

![Screenshot from 2021-10-03 19-11-45](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e4422374041a910e1064553dfb4defed6484d36b.png)

![Screenshot from 2021-10-03 19-11-50](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/22f46902988f8581e5c69630206c2de1a88936b7.png)

(Ok.... Not the latest version of the node.... Updating now.)  
Only to save me (maybe) having to repost.....

Hang on.

---

<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:** [3 October 2021 08:13 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793/4 "2021-10-03T08:13:25Z")

</div>

> [@Trying\_to\_learn](#):
>
> In the node example I posted the `?` was a `*` .

`*` means every day and `?` means don't care/unspecified  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/22b06aef61dd52566bbd1e576284cea87ebe56c4.png)

So when you use `*` it will execute every day - HOWEVER - in this instance, `*` and `?` are irrelevant because `SUN#1` will limit the schedule to the first Sunday.

---

<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:** [3 October 2021 08:16 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793/5 "2021-10-03T08:16:48Z")

</div>

I am stupid and the subtle difference isn't getting through.

Rock is not exactly accommodating to absorbing things. 😉

Again: Thanks.

---

<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:** [3 October 2021 08:19 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793/6 "2021-10-03T08:19:32Z")

</div>

Ah! When the pop up opens, I have to select MONTH in the one I get/see/showed you.

Then it all falls into place.

---

<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:** [17 October 2021 08:20 UTC](https://discourse.nodered.org/t/how-to-detect-specific-dates-daylight-savings-with-cron-node/51793/7 "2021-10-17T08:20:18Z")

</div>

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