![]() |
2009-08-16
, 16:43
|
Posts: 81 |
Thanked: 115 times |
Joined on Jan 2008
|
#2
|
The Following 5 Users Say Thank You to iKneaDough For This Useful Post: | ||
![]() |
2009-08-16
, 19:44
|
Posts: 67 |
Thanked: 13 times |
Joined on Feb 2008
@ U.S.A.
|
#3
|
-o, --boot Query events that power the device on, if powered off. -O, --no-boot Query events that power the device on, if powered off.
![]() |
2009-08-16
, 19:50
|
|
Posts: 2,669 |
Thanked: 2,555 times |
Joined on Apr 2007
|
#4
|
![]() |
2009-08-16
, 20:12
|
Posts: 67 |
Thanked: 13 times |
Joined on Feb 2008
@ U.S.A.
|
#5
|
alarmtool -a --no-dialog --boot \ --exec "/etc/network/ics_connect.sh my_ssid" \ --time 1250510400 --recurr 1440 --recurr-count -1
#!/bin/sh source /etc/osso-af-init/af-defines.sh NET_NAME=$1 # The NET_ID can be seen by running: # # gconftool-2 -R /system/osso/connectivity/IAP \ # | grep -B 25 ssid NET_ID="$(gconftool-2 -R /system/osso/connectivity/IAP \ | sed -ne '/\/system\/osso\/connectivity\/IAP\//, /^ *name = / s@.*/IAP/\([^:]*\):@\1@gp; s/^ *name = \(.*\)/\1/gp' \ | sed -ne \ '/-.*-.*-.*-/{;N;s/\(.*\)\n'${NET_NAME}'/\1/gp;}')" echo "Network name is $NET_NAME and network id is $NET_ID" # Switch back to online mode and reconnect to the default # access point # /usr/bin/dbus-send --system --type=signal \ /com/nokia/mce/signal \ com.nokia.mce.signal.sig_device_mode_ind \ string:"normal" echo "connecting to \"$NET_ID\"" /usr/bin/dbus-send --system --print-reply \ --type=method_call \ --dest=com.nokia.icd \ /com/nokia/icd com.nokia.icd.connect \ string:"$NET_ID" uint32:0
![]() |
2009-08-17
, 06:50
|
Posts: 67 |
Thanked: 13 times |
Joined on Feb 2008
@ U.S.A.
|
#6
|
![]() |
2009-08-17
, 08:00
|
Posts: 2,802 |
Thanked: 4,491 times |
Joined on Nov 2007
|
#7
|
According to GA ( http://talk.maemo.org/showthread.php?t=25686 ) cron was withheld from the distro because it's a battery killer.
![]() |
2009-08-17
, 17:30
|
Posts: 67 |
Thanked: 13 times |
Joined on Feb 2008
@ U.S.A.
|
#8
|
![]() |
2009-08-17
, 17:45
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#9
|
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
![]() |
2009-09-05
, 17:53
|
Posts: 67 |
Thanked: 13 times |
Joined on Feb 2008
@ U.S.A.
|
#10
|
alarmd* uses retutime in initfs (sudo gainroot and chroot /mnt/initfs/ retutime) to set the time for the device to wake up. No idea if this would have to keep being set everytime it has woken up but your script could handle that.
# retutime -h retutime, Version 1.0.8 Copyright (C) 2004-2005 Nokia Corporation All rights reserved. Usage: -T, --set-time Set date string (in UTC) (Y-m-d/H:M:00 -- ex. 2004-11-12/13:16:11) -t, --get-time Get date string (Y-m-d/H:M:S -- ex. 2004-11-12/13:16:45) -A, --set-alarm Set alarm string (In UTC; seconds don't count and date must be within 24 hours from current time) (Y-m-d/H:M:00 -- ex. 2004-11-12/13:16:00) -a, --get-alarm Get alarm time -S, --clear-alarm-status Acknowledge the alarm -s, --get-alarm-status Get alarm expiration status -R, --clear-reset-status Acknowledge the reset -r, --get-reset-status Get reset status -C, --set-calibration Set calibration data -c, --get-calibration Get calibration data -I, --rtc-from-system Set RTC to match system time -i, --system-from-rtc Set system time to match RTC -h, --help Show usage Report bugs to Bugzilla.
# retutime --get-time 2009-09-05/17:42:23 # retutime --set-alarm 2009-09-05/17:44:00 # retutime --get-alarm 2009-09-05/17:44:00 # retutime --get-alarm Alarm off # retutime --get-alarm-status 1
$ let AMIN=$(/usr/sbin/chroot /mnt/initfs /usr/bin/retutime \ --get-time \ | sed -e 's@[^:]*:\([^:]*\):.*@\1@')+4 $ ATIME="$(/usr/sbin/chroot /mnt/initfs /usr/bin/retutime \ --get-time \ | sed -e 's@\([^:]*:\).*@\1@')$AMIN:00" $ /usr/sbin/chroot /mnt/initfs /usr/bin/retutime --set-alarm $ATIME $ poweroff
/etc/crontab would normally be the approach, but there is no cron tool (despite existence of /etc/cron.daily).
Documentation seems to suggest "alarmd" for this. The manual at http://maemo.org/api_refs/4.0/alarm-api/index.html is really just C code documentation. Where's the user documentation?
If I simply want to run do_something.sh at 1am every day, for example, what's the procedure?