Setting up reboot cron job on Pi

One thing i wanted to do is to restart my Pi once a day. I know Linux normaly runs stable, but i had some issues which made this step necessary.

To do so simply use the following commands...

sudo su

crontab -e

and put...

0 13 * * * reboot

at the end of this file and...


This will restart your Pi at 1300h every day.

An alternative approach, cause sometimes above stuff is not working try to create a script and run this by cron. For example in /home/pi/scripts create with...

sudo reboot it. Then...

chmod 755 /home/pi/scripts/

crontab -e

and change your previously entered line to..

0 13 * * * /home/pi/scripts/

Happy restarting.


Edit: At the moment I'm testing sudo shutdown -r 2 istead of sudo reboot. Had some sd-card corruptions after multiple reboots. Don't know if this is changing something but it's worth a try and gives a little bit the chance not to be thrown out immediatly cause Pi will now reboot 2 minutes delayed