hello there guys, i have setup crontab as uzer.
$ whoami
uzer
$ crontab -l
50 23 * * * /usr/local/bin/checkip
$ cat /usr/local/bin/checkip
#!/bin/sh
/usr/bin/lynx --dump
http://checkip.dyndns.org > /home/uzer/checkip
/usr/bin/echo `cat /home/uzer/checkip` | mail uzer@fqdn
$ ls -l /usr/local/bin/checkip
-rwxr-xr-x 1 uzer users 145 2006-01-22 12:36 /usr/local/bin/checkip
when i perform the script manually, it works. cron works for some reason on the first run only. after that, it no longer works. i get the the following e-mail for the local user and a blank one for uzer@fqdn.
Subject: cron: /usr/local/bin/checkip
Looking up checkip.dyndns.org
Unable to locate remote host checkip.dyndns.org.
Alert!: Unable to connect to remote host.
lynx: Can't access startfile
http://checkip.dyndns.org/
To me this is the best way to find my ext ip and notify me through e-mail. I have cable modem so my connection is always up. I do it this way because i have a godaddy subscription.