Cron Job not working

Status
Not open for further replies.

microtra

New Member
Messages
1
Reaction score
0
Points
1
So I'm trying to run a cron job every 5 minutes, and I think I have it configured correctly, but it's not doing anything. No output log, no emails or errors or anything. I need it to ping a url on my domain every 5 minutes, but it doesn't seem to be doing that. I'm positive my script is not an issue, because when I run the same command from my computer's ubuntu terminal, it works fine.

*/5 * * * * /usr/bin/curl http://mydomain.x10host.com/crons/cron_fivemins.php

Is there something obvious I'm missing?
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

Mod Security on our web server actually blocks requests that have CURL's user agent, which is why the cron job is failing. You might be able to get around this by either using "/usr/local/bin/php" followed by the full physical file path (or perhaps "/usr/bin/php-cgi" if you need to pass a GET parameter) instead of CURL, or you could pass a normal User Agent through CURL as a workaround.

Thank you,
 
Status
Not open for further replies.
Top