I want my PC to sleep at 04:58 and wake at 05:15, every day.
How do I do that?
You can do (at least half of) this with Gnome Schedule. (
After launching it, "New" -> "Recurrent Task". Fill in the form as you see fit.
The command to hibernate is
In regards to waking up again, please see "How do I schedule waking up from hibernation?"
Alternately, you can install the "power management interface". (
Then create a script like this:
And schedule it in the root's crontab.
How to Make Your Linux PC Wake From Sleep Automatically
Want to put your Linux PC into sleep or hibernate mode and have it automatically wake at a specific time? You can easily do this with the rtcwake command, included by default with most Linux systems.
This can be useful if you want your computer to do something at a specific time, but don’t want it running 24/7. For example, you could put your computer to sleep at night and have it wake up before you do to perform some downloads.
T he rtcwake command requires root permissions, so it must be run with sudo on Ubuntu and other Ubuntu-derived distributions. On Linux distributions that don’t use sudo, you’ll have to log in as root with the su command first.
Here’s the basic syntax of the command:
For example, the following command suspends your system to disk (hibernates it) and wakes it up 60 seconds later:
Types of Suspend
The -m switch accepts the following types of suspend:
standby – Standby offers little power savings, but restoring to a running system is very quick. This is the default mode if you omit the -m switch.
mem – Suspend to RAM. This offers significant power savings – everything is put into a low-power state, except your RAM. The contents of your memory are preserved.
disk – Suspend to disk. The contents of your memory are written to disk and your computer is powered off. The computer will turn on and its state will be restored when the timer completes.
off – Turn the computer off completely. rtcwake’s man page notes that restoring from “off” isn’t officially supported by the ACPI specification, but this works with many computers anyway.
no – Don’t suspend the computer immediately, just set the wakeup time. For example, you could tell your computer to wake up at 6am. After that, can put it to sleep manually at 11pm or 1am – either way, it will wake up at 6am.
Seconds vs. Specific Time
The -s option takes a number of seconds in the future. For example, -s 60 wakes your computer up in 60 seconds, while -s 3600 wakes your computer up in an hour.
The -t option allows you to wake your computer up at a specific time. This switch wants a number of seconds since the Unix epoch (00:00:00 UTC on January 1, 1970). To easily provide the correct number of seconds, combine the date command with the rtcwake command.
The -l switch tells rtcwake that the hardware clock is set to local time, while the -u switch tells rtcwake that the hardware clock (in your computer’s BIOS) is set to UTC time. Linux distributions often set your hardware clock to UTC time and translate that to your local time.
For example, to have your computer wake up at 6:30am tomorrow but not suspend immediately (assuming your hardware clock is set to local time), run the following command:
You can try setting up BIOS for a wake up event, Almost every motherboard have that feature, use your mb manual and figure out it, in some AMI bios, it is called Wake up by RTC alarm, I think that is the easy way to wake up the PC at a specific time
So if anyone is interested this is what I found that works, without having to install anything and as non-root.
Use this command Code:
and to delay it use the sleep command with a number with either s m h or d (sec, min, day, hour) and with a ;
That suspends the computer after 60 seconds