Cronjob Output

Cronjob Output

Posted by: docdave
Posted on: 2008-05-02 13:52:00

Anyone know how to stop WGET in crontab from creating a file on my directory each time it is ran. FTP'd in today and saw a ton of files at my top level directory. Any ideas? Here is my crontab contents:

59 * * * * WGET http://www.mysite.com

Re: Cronjob Output

Posted by: rlparker
Posted on: 2008-05-02 14:06:00

Well, that crontab is doing exactly what you are telling it do do with the wget command; it's "getting" the file (and storing it).

What are you actually trying to accomplish with that cronjob? wink

--rlparker


Re: Cronjob Output

Posted by: docdave
Posted on: 2008-05-04 06:04:00

The php file I am calling with WGET runs some site maintenance every hour; clean up DBs, etc.

Re: Cronjob Output

Posted by: sdayman
Posted on: 2008-05-04 07:58:00

Try:
wget -q -O /dev/null http://www.mysite.com

-q makes it run with no screen output, and -O dumps the content to a file. In this case, /dev/null, which is a black hole.

-Scott

Tags: crontabwgetlevel directorymysite com