Using RTC for wake up

Sven Klomp sven at
Thu Jul 31 14:47:40 CEST 2008

On Wednesday 30 July 2008 16:24:02 Holger Freyther wrote:
> On Wednesday 30 July 2008 15:44:06 Sven Klomp wrote:
> > On Wednesday 30 July 2008 13:57:29 Holger Freyther wrote:
> > > with ASU atd is running and you can schedule execution of programs by
> > > placing files in a certain directory (take a look at the code),
> > > otherwise use the plain linux rtc ioctl interface directly.
> >
> > And atd can also wake up from suspend? I couldn't find where the RTC is
> > set...
> Yes, it will wakeup. This is how the alarm handling of the Qtopia clock is
> done. The code of atd can be found here [1]. I'm not sure if it is the
> latest available version...
> [1]

It is an interesting approach. A script can be put into /var/spool/at with the 
filename "[timestamp].whatever" and will be executed at time [timestamp].
But what will happen, if the script isn't removed after execution?

The atd searches every 10 min for new files in /var/spool/at. How can I tell 
atd to search now for new files? I didn't understand the intent of the 
trigger fifo...

Nevertheless, I had a look on ioctl calls in Python. The attached Python 
script reads the time from /dev/rtc.
You have to stop atd since it blocks /dev/rtc. Maybe atd can be changed in 
such a way that it only opens /dev/rtc when using it?

Best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/x-python
Size: 534 bytes
Desc: not available
Url : 

More information about the devel mailing list