1

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?

Fun4stuff
  • 11
  • 1
  • 2
  • 4
    Try adding a @reboot shutdown -h 08:36 line. Which uses the shutdown command's scheduler. – Dougie Mar 09 '20 at 14:18
  • Not working. Also tried adding that in autostart file. No luck. – Fun4stuff Mar 09 '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 09 '20 at 17:48

1 Answers1

1

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.

M. Rostami
  • 4,323
  • 1
  • 17
  • 36