I am using Ubuntu 10.04 System. In that, I am trying to wake-up my system automatically at specific time.For that,I wrote a python script for wake-up automatically.The script was run perfectly and I was checked in this location /sys/class/rtc/rtc0/wakealaram.The wake-up time was successfully wrote in this wakealaram file. But the system is not waked-up at specified time. If you have any idea about this problem, let me.It is very useful to me.
rtcwake
The command that you are interested in is
rtcwake
:testing
To find the correct syntax that works for you try the following:
This should suspend the computer for 60 seconds before restoring. The significant parameter is
mem
You have several options you can choose - play to find the value that works best for you:Suspend Until A Known Time
A script (at the bottom of this post) could be used to suspend your computer and wake at a specific time:
syntax is
suspend_until [hh:mm]
for exampleSave the script as the name
suspend_until
and give it execute rights i.e.suspend_until script
Cron
You can create a root cron job that calls this script to execute at a specific time in the evening and then awake in the morning:
Now enter something like to run the suspend script at 23:30:
Note:
Change
mem
in this part of the script for whatever suspend method works for you:You may also have to substitute the
-u
flag in place of the-l
flag depending on whether your hardware clock uses UTC (-u
) or local (-l
) time. Note that your hardware clock is different from the system clock you see in your operating system.If you want, you can convert this into python script impoting
os.system
as usual.Source: askubuntu
It's not Ubuntu that directly supports this facility.
The BIOS needs to have the right feature.
This page describes that feature http://www.mythtv.org/wiki/ACPI_Wakeup
So unless you BIOS supports it, all the commands in the world isn't going to help.