Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5471

Raspberry Pi OS • Re: Reboot using crontab

$
0
0
@thagrol
Fixed it, thank you very much for the time you have spent helping me.

I typed

Code:

sudo crontab -e
and this confirmed that there was no crontab at root and it would create an empty one (sorry I did not get the exact words because they just flashed on the screen before a new crontab window opened)
I then typed:

Code:

m h * * * sudo reboot


and it worked which if I have understood correctly meant that I had previously been trying to reboot from a crontab that was not root.
Thanks again,
roots crontab already runs as root
there is no need to use "sudo reboot" because just "reboot" will work there

Statistics: Posted by cleverca22 — Wed Mar 06, 2024 11:34 pm



Viewing all articles
Browse latest Browse all 5471

Trending Articles