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.
Asked
Active
Viewed 850 times
0
1 Answers
0
Just run
shutdown -c
to cancel the pending shutdown and correct your command

kureikain
- 101
- 2
-
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. – user535733 Feb 04 '21 at 23:44
-
when i try that i get Failed to set wall message, ignoring: Interactive authentication required – Sidewinder Feb 04 '21 at 23:55
-
reboot-at-3am
file to sayshutdown -R
if you want to reboot.-h
means "hard" – Feb 04 '21 at 23:41