# How to create a dynamic inject-node with dynamic timestamp?

**URL:** https://discourse.nodered.org/t/how-to-create-a-dynamic-inject-node-with-dynamic-timestamp/84026
**Category:** General
**Tags:** function-node
**Created:** [25 December 2023 21:59 UTC](https://discourse.nodered.org/t/how-to-create-a-dynamic-inject-node-with-dynamic-timestamp/84026 "2023-12-25T21:59:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Gawan](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@Gawan](https://discourse.nodered.org/u/Gawan)
#### Post date: [25 December 2023 21:59 UTC](https://discourse.nodered.org/t/how-to-create-a-dynamic-inject-node-with-dynamic-timestamp/84026/1 "2023-12-25T21:59:15Z")

</div>

Hi al,  
I am used to INJECT Nodes and I know how to set a static time for the node to execute.  
But is there a possibility to set the time to execute the node somehow dynamically ?  
I do not want to set a time like "06:00" and use a function to check the real time every 10sec, because this would mean to execute it 6 times.  
I would rather set it once - exactly as the inject node works.  
BR  
Gawan

---

<div class="post-metadata">

### Author: ![Xenon](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/xenon/32/48893_2.png) [@Xenon](https://discourse.nodered.org/u/Xenon)
#### Post date: [25 December 2023 22:13 UTC](https://discourse.nodered.org/t/how-to-create-a-dynamic-inject-node-with-dynamic-timestamp/84026/2 "2023-12-25T22:13:48Z")

</div>

Hi Gawan,  
did you try the UI scheduler node ([node-red-contrib-ui-time-scheduler (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-ui-time-scheduler/in/590bc13ff3a5f005c7d2189bbb563976))?  
Giulio

---

<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: [25 December 2023 22:20 UTC](https://discourse.nodered.org/t/how-to-create-a-dynamic-inject-node-with-dynamic-timestamp/84026/3 "2023-12-25T22:20:53Z")

</div>

All completely possible using [cron-plus](https://flows.nodered.org/node/node-red-contrib-cron-plus)

From the readme:

> Ability to add, remove, list, export, stop, start, pause schedules by a command payload input. Examples include...
> 
> - add - add one or more dynamic schedules
> - describe - describe solar events or cron expression (without the need to add a schedule)  
> \* useful for creating a dynamic dashboard like this: [https://flows.nodered.org/flow/79a66966a6cc655a827872a4af794b94](https://flows.nodered.org/flow/79a66966a6cc655a827872a4af794b94)

There are also built in importable demos (`ctrl-i` =\> examples)

---

<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: [23 February 2024 22:21 UTC](https://discourse.nodered.org/t/how-to-create-a-dynamic-inject-node-with-dynamic-timestamp/84026/4 "2024-02-23T22:21:37Z")

</div>

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