Hi,
Some of my forum statistics are not displaying. Most Users ever online is ok and currently online is ok but the Forum and Member stats are empty?
www.ilivein.co.uk
Thanks,
Vicky.
Hi,
Some of my forum statistics are not displaying. Most Users ever online is ok and currently online is ok but the Forum and Member stats are empty?
www.ilivein.co.uk
Thanks,
Vicky.
is your wp cron working? if so, please check forum – toolbox – cron inspector and see which sp cron jobs are active…
if they have gone awry, usually a quick deactivate (NOT uninstall) and reactivate of the simple press plugin will kickstart them back…
The forum stats are updated hourly using the WP Cron system. If they have stopped updating then there is a chance that your WP Cron system has failed or lost the task.
Look in the forum admin > Toolbox > Cron admin panel and this will tell you if a stats update is scheduled. If there is no sign of it then I would suggest you start by deactivating Simple:Press (NOT uninstalling) and then immediately reactivating it and taking another look. Usually that act will reconfigure the WP Cron active list.
It should, of course, stay in the active list. Buit we know from experience that sometimes WP seems to lose track of them.
anyway – see if that resolves it. And you can run the task manually from the input box at the bottom of that panel as well.
Thanks guys.
Deactivating and reactivating the plugin didn’t help.
I ran the sph_stats_cron manually one time and it did update the statistics.
How will I know whether it will be run again?
Vicky.
look in the cron inspector as mentioned… forum – toolbox – cron inspector… any sp crons should be bolded… sph_stats_cron is the one you would be looking for… if there, should run every hour…
sph_stats_cron is there and is bolded:
| November 25, 2012 – 7:21 pm | 1353871284 | SP Stats Interval | sph_stats_cron |
The thing that is odd is the Next Run (date) is a date in the past.
The sp_stats_interval is set to:
| sp_stats_interval | SP Stats Interval | 3600 |
| hourly | Once Hourly | 3600 |
The stats are still not being updated.
Thanks for your help.
so on the cron inspector, try adding a new stats cron… in the add cron section, leave timestamp blank, enter hook of ‘sph_stats_cron’ without quotes and enter ‘sp_stats_interval’ as the interval, again without quotes… and save…
do you now see two sp stats cron? see if the second one runs every hour…
I created another job but the next run date was the date/time it was created and thus now in the past.
If you go to the forum admin > Optiuons > General Display Settings – what do you have set for ‘ Update interval for stats (in hours)’?
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?
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.
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? ![]()
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…