Earlier, i made this post Cron /bin/sh: www.mysite.com/cron.php: No such file or directory>, and the main issue of that one has been solved, but i am still stuck with no cron working, a suggestion has been made to use this handbook but i am not able not get it working...
I requested there:
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?
So i need help to get this hack-around working.... or can someone provide another method?
A few more things to re-iterate, i am getting
"/home/mysite/public_html/scripts/cron-curl.sh: line 4: curl: command not found" with curl and i have changed the address inside the file to indicate to www.mysite.com/cron.php
I am getting nothing when i set up the cron job to the lynx(more clarification: i am not even getting the log email, and nothing appears on the site logging system)
One thing to add: when i tell the cron to run directly the cron.php file i am getting:
/home/pslegion/public_html/cron.php: line 1: ?php: No such file or directory
/home/pslegion/public_html/cron.php: line 2: //: is a directory
/home/pslegion/public_html/cron.php: line 3: /**: No such file or directory
/home/pslegion/public_html/cron.php: line 4: access-logs: command not found
/home/pslegion/public_html/cron.php: line 5: syntax error near unexpected token `('
/home/pslegion/public_html/cron.php: line 5: ` * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).'so any suggestion or help is appreciated. Thanks in advance
Comments
(!)
sorry i should have previewed before submitting, here is the correction for the first line i wrote
(-)
I am trying out some tricks
(\)
I want to thank you all for your wonderful support and insightful suggestions :p(don't get shocked I am talking about the last post related to this one)
now i am able to run cron using this
/usr/bin/php -q /home/mysitewhichispslegion/public_html/cron.phpi can verify that cron is running by the log messages, but my concern now lies with the report message, have at what i am getting:
same message
Hi,
I'm getting the same warning after running cron:
Did you have any luck fixing it or finding out what caused it. Thank you!
nope
i wasn't able to fix it...
then i tried to use the
php /home/xxx/public_html/cron.php, but this one uses the php memory, so it causes downtime, therefore i sticked with the curl method, and i am getting this error on every cron run, but the site is still working properly, no slowdown, you can see it here....but you may want to re-open this issue as i had a long history of questions on these forums, so i think that most of the regulars here avoid responding to my questions... and keep me posted if you find a solution, i almost forgot about the error, but now that i remember it, it would be nice to fix it.
ps: if you have a big php memory limit (ala not on shared hosting), you may want to run cron directly via php, it is not recommended but you'll avoid getting these errors.
I get those errors on Drupal
I get those errors on Drupal 6
subscribing to this Cron error message thread
I've had the same cron warning message:
After my server host advised me to create this crontab with php -f at start:
Interested to see if anyone can advise. I'll be looking on google for answers also.
I had this session error too on an apache server.
This is the only code I got to successfully run without the error:
cd '/home/USER/public_html/DRUPALROOT' ; php 'cron.php'
Mine only started giving message after a few days
I am now getting the same message. The interesting part is that it only started happening after a few days of cron running normally with the initial command I entered. Would that have something to do with the hosting company changing any setting in the server. I have not changed anything from my side.
If anyone has any luck finding out more about this error I'd love to know.
Raul
raulcaceres.me
My cron job is working OK now
I contacted my host again (their previous advice had not worked); they then suggested this command for the crontab:
/opt/curlssl/bin/curl -s http://mysite.org.uk/_drupal_test/cron.php
I entered the above line in the crontab command field, through my c-panel (with standard view).
And it's FIXED!!!
My server set up is this (if useful):
Apache version 2.2.8 (Unix)
MySQL version 4.1.22-standard
PHP version 5.2.6
Perl version 5.8.8
Can give more info, if anyone wants it.
Thanks a lot) This worked for
Thanks a lot) This worked for me. But i used
wget -q -O temp.php http://mysitedomain/script.php
i found this line in my host's faq.
Also used c-panel, and crontab with standard view.
This worked for me as well, thank you
The cron command I had in place initially (below) was running successfully for months. Then all of a sudden started producing errors (using Bluehost as a shared server):
GET http://example-drupal-site.com/cron.php
Changing it to what you suggested worked:
/opt/curlssl/bin/curl -s http://example-drupal-site.com/cron.php
Thanks!