I have set this cronjob because I want my server to be rebooted everyday at 05:00# file: /etc/cron.d/reboot* 5 * * * root reboot &> /dev/nullI think it worked the first time as I was kicked out of the ssh connection. But now I came back some days later and found this:$ uptime07:12:13 up 7 daysDoes this mean that it hasn't rebooted in 7 days? What is wrong?
Cronjob for rebooting everyday
cron;reboot
As the other commentators said, if uptime reports 7 days of uptime, the system hasn't rebooted in that while.Besides @Dennis' correct comment, remove the pipe to /dev/null temporarily, then check root's mail and /var/log/syslog.If the reboot command is not on the executing shell's PATH, cron might simply not find it. Some systems don't have the reboot command, in which case you'd need to use shutdown -r now.