Sample Header Ad - 728x90

Can't shutdown Linux guest OS with `at` command

0 votes
1 answer
173 views
Here are three examples of what I did inside the terminal (the third one has sudo): 1.
at now + 5 minutes
(interactively:)
at> shutdown --poweroff now
2.
echo "sbin/shutdown -h now" | at 14:50
3.
echo "/sbin/shutdown -h 16:22" | at now
In every case, I can verify the one-time job is scheduled with the atq command, but the shutdown --show command says "No scheduled shutdown". The system should shutdown at the scheduled time that at runs after sleeping. This is on a CentOS 9 Stream guest virtual machine.  The user is already added to the sudo users group and can initiate the shutdown with a command like shutdown now.  So, with the one-time at job, what’s the difference?
Asked by Samir Fink (3 rep)
Mar 5, 2024, 09:25 PM
Last activity: May 26, 2025, 09:48 AM