I'm very new to ubuntu. I am trying to cancel a shutdown I accidently put using the command echo "0 3 * * * root /sbin/shutdown -h 5 'system will reboot in 5 minutes'" | sudo tee /etc/cron.d/reboot-at-3am
How can I stop this from shutting down. I wanted it to reboot at 3am but it is just shutting down and not restarting.
1 Answer
Just run
shutdown -c
to cancel the pending shutdown and correct your command
-
Seems like this would only work during the fraction of a second after cron reads the crontab that minute. Cron doesn't run commands in advance. Feb 4, 2021 at 23:44
-
when i try that i get Failed to set wall message, ignoring: Interactive authentication required Feb 4, 2021 at 23:55
-
reboot-at-3am
file to sayshutdown -R
if you want to reboot.-h
means "hard" 🤐