Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Forum Statistics not displaying
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 28, 2012 - 8:54 pm

so just the number 1?  what if you add a timestamp that is in the future when you add the one?

a bit confused because these are all just wp functions...  is your wp cron functionality working?  if you create a new wp blog post and schedule it for 10 minutes in the future, does it post?

Avatar
Victoria Pike
Member
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2012 - 7:27 am

Good point Mr Papa! I did a bit of looking about on Wordpress and found the problem.

The situation is this: my hosting company (a big and well-established UK hosting company) has decided that scheduled cron jobs on shared hosting is a resourcing/security issue. Basically they doubt the competancy of the people kicking the crons off in case the jobs bring the server to its knees - or so they tell me.

But I find it a bit odd that I am able to kick off sph_stats_cron manually?

It leaves me a bit stuck and I'm wondering how many other things it will affect? I take it my weekly subscription email will be affected?

Any advice gratefully receieved!

Thanks,

Vicky.

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 3, 2012 - 2:29 pm

Steve is the expert on this not me and If I get something wrong here than I am sure he will chime in when he is around later... So...

Are you confusing 'wp-cron' with the normal *nix 'Cron'? The wp version is really only a sort of pseudo cron - it doesn't use the *nix cron scheduler bit sort of emulates it. But - as I understand it - it does make a separate HTTP call to the wp-cron.php file in the background so it might be that your hosting has stopped that. If that is the case then I am unsure of a possible solution but it can be explored.

So the reason why the cron task itself can be successfully run from our Cron Task toolbox would be that it bypasses that background call to wp-cron.php which is the main processor for all Wp cron tasks - and runs the task function itself immediately.

Now Steve... did I get that right? :)

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 3, 2012 - 7:35 pm

yes, pretty much right!  but on some hosts, the wp cron stuff still doesnt run right...

the easiest thing to do, at least for now, is to edit your spFunctions.php file in your sp theme (be sure its yours and not one of ours so you dont lose changes)...  and put this line of code in there:

do_action('sph_stats_cron');

this will cause the stats go get updated on every page load...  its a bit overkill and will use a few resources but will ensure stats are up to date...

then you can test the wp cron as I said above in post #11...  the wp.org support forum has lots of threads about wp cron not working... 

if you know php code, you could come up with a very small piece of code to put around the do_action code I just gave you to not run it every time...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625