Visit Jeremy's Blog.
Go Back > Blogs > linux-related notes
User Name


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Rate this Entry

Script to quickly set the wake-alarm power on

Posted 04-27-2014 at 11:40 PM by the dsc
Updated 04-27-2014 at 11:43 PM by the dsc
Tags wakealarm

I think it's working. Issuing "set-alarm 6:00" will set the computer to automatically turn on the next day at 6am, or the same day, if the script was executed after midnight already.

Information about the whole thing, read before trying anything, no warranties/responsibilities whatsoever and all that, actually by having some trouble with the script you warrant ME the legal rights to sue YOU for a billion dollars and/or have you as my free butler for life:


echo 0 > /sys/class/rtc/rtc0/wakealarm

hour=`date '+%H'` ; hour="$(echo $hour | sed 's:0*::')" 

if [ $hour -ge 0 ] && [ $hour -lt 12 ]; then pref="today"

date -u --date="$pref $1" +%s > /sys/class/rtc/rtc0/wakealarm

grep "alrm_date\|alrm_t\|m_IRQ" /proc/driver/rtc
Posted in Uncategorized
Views 466 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 05:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration