I was trying to setup my raspberry pi in crontab to reboot every time at midnight, it didn't work, So I set it to run the command every minute, didn't work, so I put sudo in front of reboot, now I have a raspberry pi rebooting every minute, and I can't stop it. facepalm I know...

Does anyone have any idea how to stop it?


1 Answer 1


As you have done all the progress on the crontab, I suggest resetting it to the default configuration.

Try the command below to reset it (the -r flag removes current crontab configuration.):

crontab -r

You can also use crontab -e and manually delete everything inside. Another option is -l to get a list of crontab configuration as an output.
In addition, You can use the -u flag to change someone else's configuration followed by the corresponding username.

If the vi editor bothers you, you can open/edit the crontab by adding export VISUAL=nano; before the crontab command with any flag you want like:

export VISUAL=nano; crontab -e  
  • The crontab -r worked like a charm, I only have 5-10 seconds to clear it it again before it reboots again. doing it manually would take too long. THANK YOU SO MUCH!!!!
    – JareBear
    Mar 26, 2020 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.