wake up on schedule

Asked by stefan deutsch

i really need some tool to get the machine wake up at specific time on ubuntu what seems to be very difficult to do ,comparing to windows i ve tried kalarm ,apm sleep, alarm clock and they are all able to schedule a shut down or hibernate or tasks but what i need is wake up
can anybody please help ?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu acpi Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

Your BIOS should be able to do this in its power management settings.

Revision history for this message
stefan deutsch (rambo6006) said :
#2

i know about this obtion in some bios but
my bios power management setting there is only one option to wakeup when usb device plugged

Revision history for this message
mycae (mycae) said :
#3

The problem here is that what oyu are suggesting is currently considered an administrative action;

You certainly can do it, but it requires using the command line:

http://www.mythtv.org/wiki/ACPI_Wakeup#Using_.2Fsys.2Fclass.2Frtc.2Frtc0.2Fwakealarm

Revision history for this message
stefan deutsch (rambo6006) said :
#4

thak you very much for replay but your solution seems to be very hard for me ,is there any other possibility not so difficult or some peace of software to do it ?

Revision history for this message
Jeruvy (jeruvy) said :
#5

What is so difficult about this? The instructions look pretty clear, lots of explaining about whats happening.

If you wish to hold out for another solution you may, but if you are looking for a solution give this a try.

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
ralph (rmcknight) said :
#7

i completely agree, this should be very easy to do, but its not.

anyway, i have found a way that works for me, you need to place a wakeup time script that runs every time the computer sleeps.

here it is: the >> just logs the output to a test file for me to look at later, not really needed

#!/bin/sh
#if after dark, then set wakeup for tomorrow at 06:00:00 otherwise in a few mins
#case "${1}" in resume|thaw) as well as suspend hibernate

#exists as path /etc/pm/sleep.d/90_sma

case "${1}" in suspend|hibernate)
sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"

t=$(date +%H%M)
if [ $t -ge 2000 ]; then
 sh -c "echo `date '+%s' -d '+ 1 day 06:00:00 UTC'` > /sys/class/rtc/rtc0/wakealarm"
else
 sh -c "echo `date '+%s' -d '+ 14 minutes UTC'` > /sys/class/rtc/rtc0/wakealarm"
fi

cat /sys/class/rtc/rtc0/wakealarm >> /home/sma/sma-bluetooth/last_log.txt
cat /proc/driver/rtc >> /home/sma/sma-bluetooth/last_log.txt

exit 0
esac