# Time\_Range\_Switch - Usage

**URL:** <https://discourse.nodered.org/t/time-range-switch-usage/44614>\
**Category:** General\
**Created:** [23 April 2021 13:56 UTC](https://discourse.nodered.org/t/time-range-switch-usage/44614 "2021-04-23T13:56:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeyD](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@MikeyD](https://discourse.nodered.org/u/MikeyD)\
**Post date:** [23 April 2021 13:56 UTC](https://discourse.nodered.org/t/time-range-switch-usage/44614/1 "2021-04-23T13:56:30Z")

</div>

I'm using Time Range Switch to turn on my irrigation at dawn. I want it to switch off 30 minutes later. Because dawn only occurs once/day, it's difficult to run a debug.

I tried it this morning and it came on as scheduled. However, I think it turned off again 10 minutes later.

I insert a time stamp every 10 minutes.

This is my setup.

 ![Screen Shot 2021-04-23 at 16.50.42](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0d0cd5219e91c9081333bfcd5b711f85cfcf5a72.png)

Am I doing it right?

Thanks

Mike

---

<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:** [23 April 2021 19:43 UTC](https://discourse.nodered.org/t/time-range-switch-usage/44614/2 "2021-04-23T19:43:32Z")

</div>

It helps if you share exactly what Node package you are using. There are quite a few that deal with dates/times and schedules.

I was using CRON+ for this kind of thing. But recently I've started using node-red-contrib-sun-position as I needed some different outputs that were easier than with CRON+. It's "enhanced inject" node would do what you want.

---

<div class="post-metadata">

**Author:** ![MikeyD](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@MikeyD](https://discourse.nodered.org/u/MikeyD)\
**Post date:** [27 April 2021 16:16 UTC](https://discourse.nodered.org/t/time-range-switch-usage/44614/3 "2021-04-27T16:16:14Z")

</div>

Thank you for this. I took a look at node-red-contrib-sun-position and it looks like it might answer my needs.

The node I was referring to is node-red-contrib-time-range-switch.

---

<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:** [27 April 2021 16:55 UTC](https://discourse.nodered.org/t/time-range-switch-usage/44614/4 "2021-04-27T16:55:50Z")

</div>

@MikeyD - It's very easy to setup using CRON+......

 ![sprinkler](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/914e5012c4bf902a6671c9fee3075e1bbd34d8b2.jpeg)

I've selected the 'civil dawn' for both of the option \<1 selected\>, but could be sunrise, etc.

![sprinkler2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/4/644684f882639151b00f1faf72994ca81e87b9c8.jpeg)

---

<div class="post-metadata">

**Author:** ![MikeyD](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@MikeyD](https://discourse.nodered.org/u/MikeyD)\
**Post date:** [28 April 2021 07:00 UTC](https://discourse.nodered.org/t/time-range-switch-usage/44614/5 "2021-04-28T07:00:47Z")

</div>

Yes, that does look easy. Thanks, Paul.

---

<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:** [27 June 2021 07:01 UTC](https://discourse.nodered.org/t/time-range-switch-usage/44614/6 "2021-06-27T07:01:38Z")

</div>

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