Quote:
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.
Code:
cd <some dir>
echo /usr/bin/wget ..
wait
exit
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.
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.
Code:
(change directory)
echo wget -O - --http-user=username --http-passwd=password 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com'
wait
exit
Normally, if I just run the command in shell, some processing would be done and something like this gets output to shell:
Code:
--21:48:23-- »https://dynamic.zoneedit.com/auth/dynamic.html..
=> `-'
Resolving dynamic.zoneedit.com... 69.72.142.98
Connecting to dynamic.zoneedit.com[69.72.142.98]: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
Code:
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.