Thread
:
How to properly use alarmd?
View Single Post
niv
2011-04-27 , 15:55
Posts: 74 | Thanked: 34 times | Joined on Jan 2008
#
6
#!/usr/bin/env python
#simple example to issue a command using python and maemo alarmed RTC tool
# look at /var/cache/alarmd/alarm_queue.ini for the full queue
import time,alarm
if __name__ == '__main__':
event = alarm.Event()
event.appid = 'lovelyName'
event.alarm_time = time.time() +10
action = event.add_actions(1)[0]
action.flags |= alarm.ACTION_WHEN_TRIGGERED | alarm.ACTION_TYPE_EXEC
action.command = 'touch /tmp/alarm.txt'
cookie = alarm.add_event(event)
print cookie
Last edited by niv; 2011-04-28 at
14:45
.
Quote & Reply
|
The Following 2 Users Say Thank You to niv For This Useful Post:
tetris11_
,
Wikiwide
niv
View Public Profile
Send a private message to niv
Find all posts by niv