cron job returns 404 error
I'm trying to run php script via cron job and got 404 error.
My command is :
*/1 * * * * curl www.domain.com/folder/script.php
And I got cron email like this :
What is the source of this problem? I've been using the same command for Cron job and it has worked in other sites.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
104 1982 104 1982 0 0 235k 0 --:--:-- --:--:-- --:--:-- 483k
404 Not Found
404 Not Found
The server can not find the requested page:
/folder/script.php (port 80)
Please forward this error screen to www.domain.com's]
WebMaster.
What is the source of this problem? I've been using the same command for Cron job and it has worked in other sites.
-
Hello :) Have you tried using PHP directly? EX: /usr/local/bin/php -q /home/username/public_html/folder/script.php
Thank you.0 -
I suggest consulting with your web hosting provider to have them review the cron job and determine why it's producing a 404 error page. It's difficult to troubleshoot that type of issue without root access. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments