Cron Job - wget or curl


#1

Hello,
i have to call a url… let’s say www.example.com/cron.php

few months ago i had this cron setup as following:

And was running smoothly. Suddenly has stop working so i’ve tried:

[code]curl --silent --compressed http://www.example.com/cron.php

wget http://www.example.com/cron.php

wget -qO /dev/null “http://www.example.com/cron.php”[/code]

But everything returns me errors… can anyone help me? I’ve already readed the DH wiki but with no luck

Thank you in advance!


#2

you need a dash after the O in wget. Right now you’re dumping it to null.

this is what i use to update a GeoIp database

DB_location="http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
wget --progress=dot:mega --waitretry=300 $DB_location 2>&1

#3

this is my cron job:

SCRIPT_location="http://www.mazzano.eldblz.com/cron.php" wget --progress=dot:mega --waitretry=300 $SCRIPT_location 2>&1

And i’m getting this error:

I just need to run this page once a day nothing more (no need to see the output via email)


#4

what exactly are you trying to do? is eldblz.com your own domain? if so, then you should be calling it at /home/USERNAME/path/to/cron.php


#5

If the OP is trying to add his cron via the panel he needs something like :

/usr/local/php5/bin/php /home/USER/EXAMPLE.COM/cron.php

replace all caps with your info…


#6

yeah, i guess i should have made it clear that the snippet i posted was part of a larger bash script. i thought the main problem was how to set up wget, but looks like setting cron itself might be more at the heart of the problem.