I'm trying to schedule shutdown of PC using at command like this:
echo "systemctl poweroff" | at -M now +1 minute
or like this:
echo "sudo systemctl poweroff" | at -M now +1 minute
but nothing happens. Why?
atd is running and the command below works fine just to check it out:
echo "echo Hello 2>&1 > /home/<user_name>/at-test.txt" | at -M now +1 minute
I know that shutdown can be scheduled using shutdown -P TIME but please answer my question first instead of pointing out some alternatives.
So what am I doing wrong?