I want to reboot my raspberry pi every day at 4 in the morning because it’s the perfect time to reboot because its guaranteed no one will connect to it, As I am hosting a local server on there and just to ensure that it doesn’t slow down or anything I want to reboot it.
I heard you can use crontab?
Would it look like this?
0 0, 4 * * * reboot
?
Or is this 4 at night?
I don’t understand how PM or AM works in this format or system.
2
Answers
Cron uses the 24 hour clock. PM is hours between 12 and 23.
4am every day would be:
(without the extra
0,
you’ve inserted in yours).This line will reboot it @4 am in the morning
I prefer using https://crontab.guru/#00_00__ this will help you time your cron events.
This is an excellent page to verify your cron time.