Something is odd then. Root's crontab runs as the root user and should have all the privileges it needs to run the "reboot" command.@thagrol
I had removed sudo from the crontab text (it was m h * * * sudo reboot) when you said it was not required but it does not reboot without it, so I have now re-instated sudo and it works perfectly.
As noted, using "sudo reboot" as the command is not harmful, but whatever is odd, may reach out and bite you in some other way.
While OP has yet to confirm, I strongly suspect they're putting the reboot command into a "normal" non-root user's crontab. Which, of course, means it will fail without sudo.
Statistics: Posted by thagrol — Fri Mar 08, 2024 6:17 pm