Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've been using the bashpodder script (http://lincgeek.org/bashpodder/) recently, and while the script works beautifully when I use it in the command line, the crontab I created for it doesn't work at all. It fails when it has to use wget. I downloaded the most recent OS X binaries for wget, but the script still fails, and I get a log with an error that reads thus:

Users/username/Downloads/audio/podcasts/bashpodder.shell: line 73: wget: command not found

Lines 71-75 read like this:

if ! grep "$url" podcast.log > /dev/null
      then
         wget -t 10 -U BashPodder -c -q -O $datadir/$(echo "$url"  | awk -F'/' {'print $NF'}  |  awk -F'='         {'print $NF'} | awk -F'?' {'print $1'}) "$url"
         let "show += 1"
    fi

Any recommendations?

share|improve this question
add comment

1 Answer

wget isn't in the default path used by cron. Give it the /full/path/to/wget and it should work.

share|improve this answer
    
That worked perfectly; thanks! –  cholantesh Mar 7 '11 at 12:43
1  
Thanks best shown by upvote & accepting answer. –  user588 Mar 7 '11 at 15:53
    
Set PATH in the shell file also wroks. –  iwill Jan 20 '13 at 7:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.