Is it possible to update the stats without having to wait for a cron run?

Comments

toemaz’s picture

The stats updating happens in the user_visits_adv_cron() function so the immediate answer is no.

A solution would be move the code to a new function and add a check in the cron function whether it is enabled or not via a variable_get check.

Feel free to code that up and provide a patch. Also, can you perhaps share your use case?

adam_c’s picture

I am by no means a drupal programmer so that would be beyond my skill right now, I may be able to get a friend to do it at some point in the future.

My case is a social networking site, I would just like the site to work in real time and keep up-to-date as opposed to having to wait for periodic cron runs, it's nothing major, just a preference.

amitgoyal’s picture

Status: Active » Closed (works as designed)

If you don't want to setup CRON then Poormanscron module can be used which runs the Drupal cron operation using normal browser/page requests instead of having to set up a crontab to request the cron.php script.