Anyway to set a timer to suspend the system say in 120 minutes similar to doing:
$ shutdown 120
But for suspension. I want to encode some stuff in handbrake and I want my pc to automatically go to sleep after so much time.
You can use
at to schedule any action.
Firstly, you have to install
sudo pacman -S at
sudo apt install at
Then, start service
systemctl start atd
And now you can do something like that:
echo 'pmi action suspend' | at 4pm
Or like that:
echo pm-suspend | sudo at now + 10 min