Dave's Brain

Browse - Programming Tips - How can I make my computer wake up at a specified time?

Date: 2014oct27
OS: Linux

Q.  How can I make my computer wake up at a specified time?

A.  Use the rtcwake command, like this:

rtcwake -m no -l -t `date +%s -d 'tomorrow 7:30'`
This is different than using cron. Because after you issue this command you can shutdown your computer and it will wake up at the time you want. Pretty cool. Here's a breakdown of the rtcwake options:
-m no = don't shutdown now -l = Use local time -t <time_t> = This option wants the seconds since 1970. Which you can make with the date command in backticks.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.