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.
{"cc_re__cc_re__cc_by_3_0": [" screensaver</a></li>\r\n\t\r\n\t</ul>\r\n  </div>\r\n  \r\n    \t\r\n  </footer>\r\n</article>\r\n\r\n\r\n  </div><!-- #content -->\r\n</div><!-- #primary -->\r\n\r\n</div><!-- #main -->\n<footer id=\"colophon\" role=\"contentinfo\">\n  <div id=\"site-info\">\t\t\t\n    <div>\n      <a href=\"#menu-navigation\" title=\"Jump to the top\">Jump to the top &uarr;</a>   \n    </div>\n    <div>\n      <a href=\"/privacy/\">Privacy</a> \n      /\n      <a rel=\"external nofollow\" target=\"_blank\" href=\"https://github.com/milosz\">Source</a> \n      /\n      <a href=\"http://creativecommons.org/licenses/by/3.0/\" rel=\"license\">CC BY 3.0</a>\n      /\n      <a href=\"/feed/\" title=\"RSS feed\">RSS</a>\n    </div>\n  </div>\n\n</footer><!-- #colophon -->\n</div><!-- #page -->\n\n\n\n<!-- Piwik -->\n<script type=\"text/javascript\">\n  var _paq = _paq || [];\n  _paq.push([\"trackPageView\"]);\n  _paq.push([\"enableLinkTracking\"]);\n\n  (function() {\n    var u=((\"https:\" == document.location.protocol) ? \"https\" : \"http\") + \"://analytics.sleeplessbeastie.eu/\";\n    _paq.push([\"setTrackerUrl\", u+\"piwik.php\"]);\n    _paq.push([\"setSiteId\", \"1\"]);\n    "]}