crontab and lynx

yogi_kudu

Registered
I'm trying to schedule lynx to hit a page every afternoon and download the results to a file. It works fine from the command line, but when i schedule the event from within crontab, I only get an empty file.

For example, I have a file called cronTest.sh that contains this line:

lynx -dump "http://www.yahoo.com" > yahoo.dmp

Then I add this to /etc/crontab:

15 18 * * * yogi /Users/yogi/cronTest.sh

The script runs at 6:15 pm, as expected, but the resulting yahoo.dmp file is empty.

Again, it works fine from the command line. I'm stumped. Any ideas?
 
Lynx was installed via Fink, and lives in the /sw/bin directory. Adding /sw/bin: to the crontab's PATH variable did the trick.
 
Back
Top