Restart node-red sever every day

Hello, node-red noob here, I need help, how do I automatically restart the node-red server completely at let's say midnight everyday?

I want to do this because I want to start a graph everyday beginning at midnight.

why not just send an empty array to the chart at midnight? That will reset the chart. you can do this with a inject node set to a scheduled time.

No I need it to restart because I am using some monitoring nodes and they tend to lose connection or throw weird errors from time to time and by restarting they also reconnect properly.

Then there are many topics on this
e.g Restart node-RED via dashboard

But I would fix the issues with the monitoring nodes, not fix bandaids.

The right answer here is fix the monitoring nodes to reconnect properly....

But you've not said where/how you are running Node-RED so this is going to be hard to answer.

Node-RED can not restart it's self (at least not internally).

So taking the most common deployment situtation (Node-RED running as a service on a Raspberry Pi...) use cron to run service node-red restart at what ever time you want.

Thank you for the tip, I would also prefer if the ALPHA ESS MONITORING, SMA WEBCONNECT and SMAPPEE MQTT nodes worked flawlessly... :slight_smile: but they don't.

I run node-red on a pc