How to automatically wake up notebook

I came across ACPI wakeup wiki article while writing previous post, got interested and checked how to automatically wake up notebook. It is really simple as you can quickly set wake up time using date command, just remember to use Unix time.

To automatically wake up computer tomorrow at 8'o clock execute command:

$ date '+%s' -d 'tomorrow 8:00' | sudo tee /sys/class/rtc/rtc0/wakealarm > /dev/null

To check when computer will wake up execute command:

$ date --date "@$(cat /sys/class/rtc/rtc0/wakealarm)"
Thu Jan 26 08:00:00 CET 2013

To unset wake up time execute command:

$ echo | sudo tee /sys/class/rtc/rtc0/wakealarm

Notes

You can suspend notebook using console command:

$ sudo pm-suspend

Notebook will wake up or turn on at specified time so be careful when using this feature.

Remember to unset wake up time before changing it.
Milosz Galazka