# Cron plus solar events AND cron

**URL:** <https://discourse.nodered.org/t/cron-plus-solar-events-and-cron/67826>\
**Category:** General\
**Created:** [16 September 2022 20:30 UTC](https://discourse.nodered.org/t/cron-plus-solar-events-and-cron/67826 "2022-09-16T20:30:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![defconhaya](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/defconhaya/32/67871_2.png) [@defconhaya](https://discourse.nodered.org/u/defconhaya)\
**Post date:** [16 September 2022 20:30 UTC](https://discourse.nodered.org/t/cron-plus-solar-events-and-cron/67826/1 "2022-09-16T20:30:18Z")

</div>

Hi,  
I want to make a schedule that activates only from May to August on sunset. Is this possible using cron plus node ?

Thanks.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 September 2022 20:51 UTC](https://discourse.nodered.org/t/cron-plus-solar-events-and-cron/67826/2 "2022-09-16T20:51:33Z")

</div>

> [@defconhaya](#):
>
> I want to make a schedule that activates only from May to August on sunset

Maybe with the addition of a `node-red-contrib-simple-gate` node  
Create 2 schedules in Cron+, one that triggers every sunset, and a second schedule that will open and close the gate node between May & August.  
Wire the cron+ into the gate node, and use the output from the gate node for your flow.

NOTE, set the `Restore from state saved...` option in the gate node to your filesystem context, so it doesn't forget its state if you reboot...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 September 2022 12:53 UTC](https://discourse.nodered.org/t/cron-plus-solar-events-and-cron/67826/3 "2022-09-17T12:53:36Z")

</div>

I believe you can do this with one of the nodes from node-red-contrib-sun-position. Certainly the blind node has some complex rules you can add as does the clock timer node.

---

<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:** [16 November 2022 12:53 UTC](https://discourse.nodered.org/t/cron-plus-solar-events-and-cron/67826/4 "2022-11-16T12:53:44Z")

</div>

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