# Recommended scheduling for roller-shutters

**URL:** <https://discourse.nodered.org/t/recommended-scheduling-for-roller-shutters/36927>\
**Category:** General\
**Created:** [3 December 2020 05:04 UTC](https://discourse.nodered.org/t/recommended-scheduling-for-roller-shutters/36927 "2020-12-03T05:04:18Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [11 December 2020 01:58 UTC](https://discourse.nodered.org/t/recommended-scheduling-for-roller-shutters/36927/10 "2020-12-11T01:58:32Z")

</div>

after some days of learning and searching through NodeRed topics, I've finally found the solution how to avoid race condition.  
**It is possible to change the time and to reset the Delay nodes !**

Here is an example I've made:

> [@Avoiding race condition in flow context?](https://discourse.nodered.org/t/avoiding-race-condition-in-flow-context/35090/6):
>
> I was looking for similar solution, and found out about this: You can simply use Delay nodes too! The trick is, you can give to msg.reset a value like "True" and it will automatically cancel all running delays. [kép] [{"id":"64ca47f5.7b75e","type":"inject","z":"37c9a989.495456","name":"Do it now","topic":"","payload":"7","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":100,"wires":[["a49806c2.c5f05","ece3fc93.0f7248"]]},{"id":"a49806c2.c5f05","type":"cha…

---

_[View the full topic](https://discourse.nodered.org/t/recommended-scheduling-for-roller-shutters/36927)._
