View Single Post
Posts: 67 | Thanked: 13 times | Joined on Feb 2008 @ U.S.A.
#5
Originally Posted by zerojay View Post
You want to use cron instead.
Why?

I read somewhere that cron isn't offered on the NIT, because it's too heavy (although I'm not sure why I see a /etc/cron.daily folder).

Theoretically, alarmtool does what I need. I have a script set up to boot every morning (Eg. 12pm GMT), connect to the LAN, and download news for offline reading, using a command like:
Code:
alarmtool -a --no-dialog --boot \
  --exec "/etc/network/ics_connect.sh my_ssid" \
  --time 1250510400 --recurr 1440 --recurr-count -1
Are there any issues I should anticipate? I ran it as a test without the recurring options, and it worked.

BTW, if anyone wants to do the same, the script to connect to the LAN ("ics_connect.sh") looks like this:
Code:
#!/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
 

The Following 6 Users Say Thank You to jgombos For This Useful Post: