wget ip update is giving "can't open update?... : File exists" wget ip update is giving ...

Topic: wget ip update is giving "can't open update?... : File exists"

Post wget ip update is giving "can't open update?... : File exists"
by Daniel Santos on Sunday, April 23, 2017

I'm using ddns to my home server and I want to update my ip using wget on my crontab.
For that I have a command on my crontab that is of the form:
*/5 * * * * sleep 15; wget "http://api.dynu.com/nic/update?username=USERNAME&password=MD5PASSWORD" . But I have notice that when I run the wget command the second time I get the a error:
"wget: can't open 'update?username=alexandre1985&password=pass': File exists".
1) Why does this happen?
2) What is the proper way of doing a wget from cron so it doesn't appear any error like this one?
Thank you

Daniel Santos

Reply with quote | Report
Post Re: wget ip update is giving "can't open update?... : File exists"
by rahsharma on Sunday, April 23, 2017

Daniel Santos wrote:I'm using ddns to my home server and I want to update my ip using wget on my crontab.
For that I have a command on my crontab that is of the form:
*/5 * * * * sleep 15; wget "http://api.dynu.com/nic/update?username=USERNAME&password=MD5PASSWORD" . But I have notice that when I run the wget command the second time I get the a error:
"wget: can't open 'update?username=alexandre1985&password=pass': File exists".
1) Why does this happen?
2) What is the proper way of doing a wget from cron so it doesn't appear any error like this one?
Thank you

Daniel Santos
Could you try using the -N parameter because that would allow it to overwrite the file which was downloaded the first time. Alternately, you could use the -nc parameter which would perform the HTTP request but not really download any existing file.

Reply with quote | Report
Thursday, March 28, 2024 8:26 AM
Loading...