Using 'at' to schedule a shutdown at next 11:00 as root
(You might have to install 'at' first: sudo apt install at
)
$ sudo at 11:00
[sudo] Password for <user>:
at> shutdown now
at> Ctrl-d
To see root's at-queue:
sudo atq
See man at
for other options and parameters.
Cron, as I mentioned too, executes a command at a given time, every time that time happens, like 15 minutes past, every 5. day of the week or combinations of minutes, hours, day, day of week and day of month. This is usefull for commands that have to run at specific times every day, week or month, but not for a onetime command. There at
is better.
at
orcron
job at the wanted time asshutdown now
. Shutdown can't be canceled when argument is now or +0.