How to restart flows automatically?

Dear all,

We're encountering a situation whereby if we have loss of connectivity, a number of flows (namely websocket nodes) fail to reconnect, while I realise we could check the source for the problematic nodes and implement a reconnect mechanism, this isn't viable for number of nodes we use (longterm, yes).

Is there a way to restart flows from within Node Red? This would not only be useful to overcome the above, but also for testing purposes... Failing that we're considering triggering a script for the container from within Node Red itself?

Any advice would be greatly appreciated.

You can use the admin http API to get the runtime to reload it's flows. An http post to /flows with the right headers set should do it.

@swiftnesses did you manage to implement that? I'm trying to do the same thing.