I have a Raspberry Pi that displays a Node-Red page, but it hangs every few days. After a reboot it is fine again. So I edited crontab to have it restart at 5 in the morning every day.
First edit the crontab file
| sudo su – #super user|
crontab -e #open and edit crontab file
At the end of the file you can specify what you want to happen a certain time. I want to reboot (sudo reboot) at 05:00 every day. So I entered this line:
|00 05 * * * sudo reboot|
For more info on the syntax see: https://www.raspberrypi.org/documentation/linux/usage/cron.md