MotionEye Cameras Failing

It seems that after a period of time the webcams attached to my raspberry pi fail after about 2 days of usage. While I haven’t had the time to delve into the reasons why, a fix or workaround is to have the device restart every day at 5am.

Log into the raspberry pi as the administrator and edit the crontab file with: crontab -e

Then add the following line:
0 5 * * * shutdown -hr now >/dev/null 2>&1

This will restart the device every day at 5am. It should keep working until I have the time to look through the system logs and find what the problem is. I suspect it may be power related, or just bad coding somewhere?