I have set up a cron task using the cron jobs application in CPanel, i indicated that every six hours it should run the following task http://www.mysite.com/cron.php and i took it for granted that it is working, but i was dissapointed when i checked the emails giving me this message /bin/sh: www.pslegion.com/cron.php: No such file or directory, i tried to play with the address, i used http://www.mysite.com/cron.php then mysite.com/cron.php then /cron.php... in short a lot, but that didn't make it work... anyway i should point out to the fact that i can run the cron manually, i can verify that by the logs entries, also there is no signs of failed attempts on the logs....
so what's the issue here?
thanks in advance for any help
By pnlnl on
Comments
use cron-curl.sh
you need to point your cron job to 'cron-curl.sh' which is in the 'scripts' directory (make sure you use the full system path). in that file swap out 'example.com' with your domain. for most of my sites this works every time.
Mark Sanders
Q Collective
Mark Sanders
Q Collective
(!)
/bin/sh: http://www.mysite-which-is-my-site-:).com/scripts/cron-curl.sh: No such file or directory
so anymore ideas???
doesn't look like you are using the system path
please confirm: are you using the full system path to the script when you set up the cron job? it should look something like the following...
/home/username/public_html/scripts/cron-curl.sh
and not...
http://example.com/scripts/cron-curl.sh
your cpanel homepage will tell you the path to the root directory.
Mark Sanders
Q Collective
Mark Sanders
Q Collective
nope
i am not using this 'verbose' version and didn't try it,, but will do now...
ok
I am making progress now, after using the verbose version, i got a message
/home/mysite/public_html/scripts/cron-curl.sh: access denied
so i changed the permissions to 744, then i got this message
/home/mysite/public_html/scripts/cron-curl.sh: line 4: curl: command not found
can anyone help me further down the road here?
you don't have curl installed
cron-curl.sh is a shell script that depends on your webhost having curl installed on their server. since the server is returning curl not found, i have to assume curl is not installed.
there is this handbook page that gives an alternate method for running cron but i'm afraid it is over my head a bit. as a refresher, however, you may want to look at all the cron tips in the handbook starting here. there are some webhost specific instructions if you have dreamhost or mediatemple.
Mark Sanders
Q Collective
Mark Sanders
Q Collective
(?)
thanks masande for your help...
now let me ask one more question, i opened the cron curl file and found this
now should I change
http://example.cominto smth like the verbose version you gave me earlier???yep
you do need to change the url in that file to point to cron.php but do not use the verbose path you used earlier. as recommended in the file, change http://example.com/cron.php to the url you use to manually fire the cron job.
does this work?
Mark Sanders
Q Collective
Mark Sanders
Q Collective
nope
that's not working, i have already tried this...
edit: I'll try handbook page you gave me later and post if it worked for me or not... but if there is any other way to get this working, anybody is welcome to utter it.....
(?)
so i am back, now i am trying to use the code provided by the handbook page...
and i need help of how to specify the root path which is by default
root_path=/var/www/html/and in the file manger i can see
/home/mysitename
so how should i input the the path?
EDIT: I HAVE MOVED THE DISCUSSION TO another post as the main issue of this one has been solved and now i am facing another dilemma