Comrades,

I used cpanel to enable automatic cron jobs every half hour.
My host reports that they can 'see cron running' as scheduled.

However, under status report in admin, cron appears to not be running, and the site definitely isn't being indexed.

Any thoughts? Please be detailed if you can. I'm pretty confused.

I'm on drupal 5.6, and my host is Network Redux: they're drupal friendly, btw.

kyle.vh

Comments

vm’s picture

goto administer -> search settings

you've staged the content to be indexed by clicking on the index site button ?

if you run cron manually what happens ?
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

pnlnl’s picture

I kind of faced the same problem, i struggled for a quite a bit to get cron running, and i think that's what's happening with you is like what happened me, I am not a very technical user, but here's my view, there are some languages that may not be supported by your host or there are some commands of this lang blocked from running, that means that the cron run but the important part doesn't

what have fixed the problem for me is this code
/usr/bin/php -q /home/yoursitename/public_html/cron.php
use it when setting up your cron job from CPanel

i get a weird message when running this code

but i can verify that the cron is running from the watchdog logs and the site is being indexed....

try it out(maybe you already have), anyway just a suggestion... cheers commyander :d

kyle.vh’s picture

Locked and loaded:
I read your earlier post before posting myself. Thanks for your thoughts. I am not using the same code you are, I'm using: php /home/myusername/public_html/cron.php . This is in the 'standard', as opposed to advanced option. I'm actually nervous to try your option becuase of the error your generating.

VM:
Index status says: "100% of the site has been indexed. There are 0 items left to index." And if I run cron manually, it does index the site. However, if I wait an hour, the status report show that cron has not re-run (even though my host reports that it is running, apparently they can check a log).

May I ask: If cron is set up properly in cpanel, should drupal show that it is running by updating the status report to show that it has run recently? Is there a page I can navigate to to see if cron is being told to index?

Any other ideas? I will post my solution if I find it. Eventually I'll pester my host more, but I want to hear from the drupal community.

kyle.vh’s picture

Funny name. I guess I'm the poor man here. This might be the way to go for users of my (dis) abilities.

Should I just use this? I was trying to be savvy and use the cpanel cron automator, but since that's not working maybe I'll use this.
Is there any reason not to? I saw someone mention that page refreshes can be slower when initiating cron jobs, but the author claims this call happens after page loading.

Also: should I disable the cron job I set up in my cpanel if I use PMC, so they're not 'interfering'?

Thanks for any ideas.
kyle.

pnlnl’s picture

1- It doesn't matter how you run the cron, when it has been run, it will be logged in watchdog, if not, then the cron task didn't get thru the preliminary steps, so nothing happened...

2- Poorman's cron is for poor man(ie users with no CPanel access on free hosts) and when your site gets bigger, things will only get worse with poorman's + it depends on the users, if a user doesn't access the site, the cron won't be run, you would tell that this is far off, i tell you yes, buy why should you bother to wait for a user to access...

3- You can use poorman's cron and the CPanel cron tasks but that's not preferable, because poormans depends on the user so there is no set time for it to run, so it may run simultaneously with CPanel's cron which would generate errors

4- I am using the cron that I stated since a few hours now and everything is working fine, and after looking thoroughly at the error generated, one can conclude that the error only affects the process on webhost pc or a bit of the process but the caching and the indexation process are happening without errors
and after thinking more into the issue the two erros are session cookie and session cookie lifetimer which are derivate from a module that i installed then uninstalled (don't remember its name, but it closes automatically the client's session after a period of time) so you should not get any errors.....
or even if you do, like i am, nothing major happened and the site is still running flawlessly...

finally it is up to you to take the decision and to see what's fit...

pnlnl’s picture

i have backuped my site, installed a fresh version of drupal, setup the cron task using the code i supplied earlier but I still got the error message, so my speculation was incorrect
the error that i got was real and independant of any module.... so can someone explain if this error is hazardous, or we can co-habit with it, from my experience nothing happened but it was just a mere few hours, maybe there are effects on the long run like slowing down the site, so it would be like using poorman's cron... all what i am saying about slow down is just speculation now, i don't have info and i am just asking any pro-druapaler to advise us me and kyle, what should we use, poorman's or the the code??

if it came down to personal preference, i would choose the cron task from CPanel, at least it is fully autonomous... but again i am asking for an objective opinion...

kyle.vh’s picture

Is that a module?
Or is it something core to admin?
How can I access it to check if cron has run?

L&L is that code your using pasted into the cron job for 'advanced' or 'standard'?

kyle.vh

pnlnl’s picture

1- watchdog is drupal 5.x logging system, it is the simply the module that provides the logs, on a side note combining this core module with watchdog live module you will able to monitor in real time your site, every action every error...

2-you access the logs administer --> recent log entries --> [cron messages] filter
and you should be able to see all of the messages related to cron..

3- the code i pasted was in standard mode, there is no big difference between standard and advanced mode but advanced gives you a bit more control, but this code is paste-able in standard mode....

4- i don't why the hell nobody is responding, i guess maybe nobody run into this error before !!!

kyle.vh’s picture

Thanks L&L,
It's strange that no one else has your error. Did you read the thread below?

This (http://drupal.org/node/179421) forum topic suggests using:
php /home/yourusername/public_html/cron.php
to automate cron.

When I do this, cron is being run according to my host (who can see a log). But not according to drupal watchdog.
The host reports that:
"Could not open input file: cron.php. You may merely ensure the path is correct and that the file
exists at this location."
How can I check it the file exists? Is there another path I can use?
When I type: www.mysite.com/cron.php, 'page not found occurs'.

ideas?

kyle.vh’s picture

http://drupal.org/cron

the scripts they suggest look a little different than yours. You probably know this already, but I thought I'd point it out in case it helps.
Check out the bottom-most solution, that's what I'm trying.
Stupid question, but what is 'add on domain directory':
0,20,40 * * * * php /home/USERNAME/public_html/ADD-ON-DOMAIN-DIRECTORY/cron.php

mysite or,
www.mysite.com or,
http://www.mysite.com, or what?

pnlnl’s picture

Read in CPanel's help to know more about this, i was never interested or intrigued about this so i never did... but it has nothing to do with drupal... but i know what's the idea in general... if you create a subdomain and an add-on domains both named test:: when you(or anyone) type in the browser test.mysite.com you'll be automatically redirected to www.mysite.com/test in reality and you'll see in the address bar in the browser test.mysite.com and if you type www.mysite.com/test you'll go to the address and the address in the bar will be automatically changed in your address bar to test.mysite.com ... you get the idea...

a subdomain is a directory in your site, a add-on lets you reach the subdomain... read the help guides, they are more explanatory...

kyle.vh’s picture

"/usr/bin/php -q /home/myaccount/public_html/cron.php> /dev/null
generates Watchdog errors is_dir() [ although cron appears to be working OK."

http://drupal.org/node/99813 at that url.
He has same issue as you, check the thread.

I cant get this script to work either:
/usr/bin/wget -O - -q http://example.com/cron.php

weak...

pnlnl’s picture

thanks for the link

kyle.vh’s picture

I am stupid becuase there was no cron.php file. urg. this script worked: php /home/kvonhass/public_html/cron.php in case anyone is wondering.