Score:0

Ubuntu 20.04 Sleep at certain time

gf flag

I just need my Ubuntu machine to go to sleep at 3 AM, it doesn't need to wake up at a certain time I just need it to go to sleep

Then I can WOL the machine when it's needed again

Jacob Vlijm avatar
by flag
You might want to mention what is consiodered "sleep". Hibernate? Suspend?
francois P avatar
it flag
as @JacobVlijm said, you have to explain what sleep-mode you need, then you have few solutions to do so, with at or cron, with or without conditions to go on sleep-mode.
ar flag
If you use WOL to wake it, you can just turn it off at 3 AM. Why sleep?
Score:0
zw flag

Create a systemd "Realtime" timer service. For execution you may use either systemctl suspend or systemctl hibernate

You should be aware, that your timer service should have the same name as your "real" service. So you would need to create a timer service (e.g. nightlySleep.timer) and the executing service (in this case nightlySleep.service) which does the executing

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.