# Dynamic schedule management

**URL:** <https://discourse.nodered.org/t/dynamic-schedule-management/7942>\
**Category:** General\
**Created:** [13 February 2019 18:27 UTC](https://discourse.nodered.org/t/dynamic-schedule-management/7942 "2019-02-13T18:27:05Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [16 February 2019 23:41 UTC](https://discourse.nodered.org/t/dynamic-schedule-management/7942/15 "2019-02-16T23:41:00Z")

</div>

> [@TotallyInformation](#):
>
> Nope, you've nailed it, you need an embedded microservice - thankfully that is exactly what Node.js is good at and Node-RED has everything at hand.
> 
> While you don't _have_ to use a module, it most probably makes sense.
> 
> ![](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.nodered.org/scotie/40/5981_2.png) scotie:

I think we are on the same page here. NR, either in a `function` node or a custom node, can do the job without having to use mqtt/http/websockets/whatever to communicate with another process.

> [@TotallyInformation](#):
>
> You want to avoid a database if you possibly can

Something that works well in this sort of situation is the [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) data structure (a not-as-well-known-as-it-should-be feature of ES6), which makes it easy to add, update, and delete objects. The map can saved in a context variable and made persistent over restarts. There is an example in the `function` node I posted in [another thread](https://discourse.nodered.org/t/send-payload-when-certain-event-is-received-x-number-of-times-within-specified-timeframe/5460/11).

---

_[View the full topic](https://discourse.nodered.org/t/dynamic-schedule-management/7942)._
