TIPS
There are 3 things to consider.
1) power on time is 2AM (we will power on 2mins after 2am though)
2) 2am today or tomorrow
3) timezone
If today is 25th June 11PM and u want to schedule it tonight at 2AM...command wud be
Code:
echo `date '+%s' -d '2am next day + 332 minutes'` > /sys/class/rtc/rtc0/wakealarm
If today is 26th June 1AM and u want to schedule it tonight at 2AM...command wud be
Code:
echo `date '+%s' -d '2am + 332 minutes'` > /sys/class/rtc/rtc0/wakealarm
Here i have assumed that u r in India so timezone is +5:30 = 330minutes, 2 minutes I have added as safe margin just incase ISP time is little late.
Note: Sometimes ur BIOS's time is already in UTC mode.. in that case you dont have to add 332 minutes.
To verify that alarm time is set, run this command:
Output wud be something like this:
rtc_time : 14:23:30
rtc_date : 2011-06-25
alrm_time : 02:02:00
alrm_date : 2011-06-26
if alrm_date shows stars .. like ****-**-26 this means that its not set and time u specified has already passsed. So play around with your time by adding/subtracting ur timezone minutes.
After the success, simply turn off ur computer and have a sleep-full night!
Sorry But i didnt checked it earlier..
Is it that you can activate RTC alarm from inside the Linux also ??