# Inject preset numbers at different times of day

**URL:** <https://discourse.nodered.org/t/inject-preset-numbers-at-different-times-of-day/10575>\
**Category:** General\
**Created:** [26 April 2019 14:41 UTC](https://discourse.nodered.org/t/inject-preset-numbers-at-different-times-of-day/10575 "2019-04-26T14:41:55Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [27 April 2019 12:32 UTC](https://discourse.nodered.org/t/inject-preset-numbers-at-different-times-of-day/10575/12 "2019-04-27T12:32:35Z")

</div>

Another possibility using the inbuilt nodes:

```auto
[{"id":"f4f88c80.c5fc5","type":"change","z":"1d66267b.4c5caa","name":"","rules":[{"t":"set","p":"time","pt":"msg","to":"$substring($fromMillis(payload+36E5),11,5)","tot":"jsonata"},{"t":"set","p":"output","pt":"flow","to":"$exists($flowContext(\"output\")) ? $flowContext(\"output\") : \"Assigned\" ","tot":"jsonata"},{"t":"set","p":"output","pt":"flow","to":"time = \"13:25\" ? \"First Condition\" : $flowContext(\"output\")","tot":"jsonata"},{"t":"set","p":"output","pt":"flow","to":"time = \"13:30\" ? \"Second Condition\" : $flowContext(\"output\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":460,"wires":[["b94eb2b2.7aaa1"]]},{"id":"b94eb2b2.7aaa1","type":"debug","z":"1d66267b.4c5caa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"$flowContext(\"output\")","targetType":"jsonata","x":550,"y":460,"wires":[]},{"id":"7963cee6.9568e","type":"inject","z":"1d66267b.4c5caa","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":460,"wires":[["f4f88c80.c5fc5"]]}]

```

---

_[View the full topic](https://discourse.nodered.org/t/inject-preset-numbers-at-different-times-of-day/10575)._
