I’m trying to schedule my pi 3b+ (buster) to shutdown automatically at a certain time, but it’s not listening to me. What am i doing wrong?

Sudo crontab -e

Then i add (nano) this to bottom of the file:

36 08 * * * sudo /sbin/shutdown –h now

This should tell it to shutdown everyday at 8:36am, correct?

  • 4
    Try adding a @reboot shutdown -h 08:36 line. Which uses the shutdown command's scheduler. – Dougie Mar 9 '20 at 14:18
  • Not working. Also tried adding that in autostart file. No luck. – Fun4stuff Mar 9 '20 at 15:45
  • 2
    I got it. It was setting it to occur the following day. I had been setting it for a few mins after current time to test it, which wasn’t working because it was setting it to occur 24 hrs later. Thanks all! – Fun4stuff Mar 9 '20 at 17:48

Open crontab by crontab -e or export VISUAL=nano; crontab -e which is much easier to edit. Then, add the line below at the end of that:

@reboot /sbin/shutdown -h 08:36

You can also follow your procedure that mentioned. Gonna work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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