Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 May 2001 13:38:57 -0400
From:      James Housley <jim@thehousleys.net>
To:        Drew Tomlinson <drewt@writeme.com>
Cc:        "FreeBSD Questions (E-mail)" <freebsd-questions@freebsd.org>
Subject:   Re: Works From Command Line But Not From Cron?
Message-ID:  <3AF6DDB1.6A7137F7@thehousleys.net>
References:  <BA5D0CE1CBB2D411B6AA00A0CC3F02390AF9C1@ldcmsx01.lc.ca.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
Drew Tomlinson wrote:
> 
> I am new to using cron.  I have a simple command that I would like have run
> every so often to update my dynamic IP address.  This is the command:
> 
> lynx -source -auth=username:password
> 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com' >>
> /var/log/lynx_dns_update.log
> 
> And the successful output from the log:
> 
> <SUCCESS CODE="200" TEXT="Update succeeded." ZONE="mykitchentable.net"
> IP="207.173.248.121">
> 
> This command runs fine from the command line but does not seem to work (no
> update) as a cron job.  From my cron log:
> 
> May  7 10:05:00 blacksheep CRON[30684]: (root) CMD
> (lynx -source -auth=username:password
> 'http://dynamic.zoneedit.com/auth/dynamic.html?host=test.mykitchentable.net'
> >> /var/log/lynx_dns_update.log)
> 
> And nothing gets appended into my logfile.  Here is my cron entry from
> /var/cron/tabs/root:
> 
> * * * * * lynx -source -auth=username:password
> 'http://dynamic.zoneedit.com/auth/dynamic.html?host=test.mykitchentable.net'
> >> /var/log/lynx_dns_update.log
> 

First guess is that it is not finding lynx, cron doesn't have the same
PATH as you normaly do.  Try:
* * * * * /usr/local/bin/lynx -sou.......

Jim
-- 
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
"It's a damn poor mind that can only think of one way to
spell a word."
    -- Andrew Jackson

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AF6DDB1.6A7137F7>