Page 1 of 1

Optware/Cron problem

PostPosted: 19 Feb 2017, 21:54
by mrsoje
Installed Optware
Installed Cron
Made Crontab for DDNS @ freedns.afraid.org

crontab | +
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/sbin:/opt/bin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
* * * * * root wget --spider "http://freedns.afraid.org/dynamic/update.php?UxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ==" >/dev/null 2>&1

From telnet this cmd wget --spider "http://freedns.afraid.org/dynamic/update.php?UxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ==" >/dev/null 2>&1
update my IP
Cron doesn't
Found this in /tmp/.log
.log | +
Feb 19 17:30:01 192 cron.info /opt/sbin/cron[2500]: (root) CMD (wget --spider "http://freedns.afraid.org/dynamic/update.php?UxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ==" >/dev/null 2>&1^M)
Feb 19 17:31:01 192 cron.info /opt/sbin/cron[2824]: (root) CMD (wget --spider "http://freedns.afraid.org/dynamic/update.php?UxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ==" >/dev/null 2>&1^M)
Feb 19 17:32:01 192 cron.info /opt/sbin/cron[3152]: (root) CMD (wget --spider "http://freedns.afraid.org/dynamic/update.php?UxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ==" >/dev/null 2>&1^M)
Feb 19 17:33:01 192 cron.info /opt/sbin/cron[3473]: (root) CMD (wget --spider "http://freedns.afraid.org/dynamic/update.php?UxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQ==" >/dev/null 2>&1^M)


Looks like its not going out to freedns.afraid.org
Any suggestions will be highly appreciated ?

Re: Optware/Cron problem

PostPosted: 20 Feb 2017, 06:22
by FarVoice
you must to see wget's log, like
wget 'http://bla...' -O /dev/null >> /tmp/wget.log 2>&1

Re: Optware/Cron problem

PostPosted: 20 Feb 2017, 09:21
by FarVoice
^M

Remove windows EOL from crontab :)

Re: Optware/Cron problem

PostPosted: 20 Feb 2017, 10:00
by mrsoje
tried to make crontab with crontab-e but don't know how to save it :oops:

Re: Optware/Cron problem

PostPosted: 20 Feb 2017, 10:10
by FarVoice
just edit it with vi or mc editor and remove ^M from the end of lines

Re: Optware/Cron problem

PostPosted: 21 Feb 2017, 01:22
by mrsoje
Thanks again .