Here are the exact steps needed on my Lucid Lynx. Please note that you need to have Kernel 2.6.22 or later for this to work.
1) Install the Power management interface tools.
sudo apt-get install powermanagement-interface
2) Copy the following code somewhere in your filesystem and save it as "suspend_x_hours.sh".
#!/bin/bash3) Schedule the script in root's crontab. e.g the following crontab entry runs at 8PM and puts the system in sleep for 10 hours, waking it up at 6:00 AM.
# This script puts the system under standby mode for x hoursusage() {echo "usage: $0 <n-hours>"echo "where <n-hours> is the number of hours to be on standby"exit 0
}
if [ $# -ne 1 ]thenusagefi
PATH=$PATH:/usr/sbin
hours=$1
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo `date '+%s' -d "+ $hours hours"` > /sys/class/rtc/rtc0/wakealarm
pmi action suspend
00 20 * * * /home/venkat/bin/suspend_x_hours.sh 10 2>/dev/null