Wget with Cron problem

pguelpa

Registered
I'm trying to use Cron to backup my website and create a file telling me which files it downloaded and which ones it skipped.

I have a working version of the script that runs fine when I execute it from the command line, but when I try to run it in cron it doesn't run properly. It sends me an e-mail which says "wget: command not found".

Has anyone had this problem or know of a solution to it?

Cheers,

Paul
 
I would look at 2 things.
1. who is running the cron job. if you just used crontab -e then you are running the cron job, if the cron user is specified as root (or anything other than you) then it will fail.

2. is the path to wget in your .tcsh or .bash file? If not then cron (running as you) will not be able to find wget.

luck
 
I think your .bashrc or whatever is not read from a cron job - you can specify the path to use in the crontab file, or, better, specify the full path to all commands.
 
I thought wget wasn't in OS X since 10.0? (Didn't curl replace it?) I know you can download wget.
 
Back
Top