Originally posted by crabboy
When setting up cron jobs always assume that cron starts you script in never-never land. You should put full paths in front of all your executables and done use .. as a directory unless you cd there first.
Cron can't be setup to run a script when your IP changes. It's not his job to do so. It only executes based on time.
cd <some dir>
echo /usr/bin/wget ..
Permanently set env variabels by either putting them in /etc/profile (system wide) or add them to /home/user/.profile or /home/user/.bashrc (.bashrc if you use the bash shell)
Hmmmmm, adding in the cd (cd / or echo cd /) didn't work.
echo wget -O - --http-user=username --http-passwd=password 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com'
Normally, if I just run the command in shell, some processing would be done and something like this gets output to shell:
Resolving dynamic.zoneedit.com... 18.104.22.168
Connecting to dynamic.zoneedit.com[22.214.171.124]:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 101 [text/html]
0% [ ] 0 --.--K/s
100%[====================================>] 101 --.--K/s
21:48:23 (320.24 KB/s) - `-' saved [101/101]
But if I do ./"script" it just echoes
wget -O - --http-user=username --http-passwd=password 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com'
Any other suggestions? Thanks you very much for replying.