boonebgorges / buddypress-group-email-subscription

Fine-grained email subscription for activity in BuddyPress groups
35 stars 31 forks source link

Digest items not being sent out #60

Open nickharambee opened 10 years ago

nickharambee commented 10 years ago

Hello,

Am I right in thinking that if I manually visit http://mysite.com/wp-cron.php, it should trigger the sending of all items in the digest queue, that are visible when I visit http://mysite.com/?sum=1.

I ask because digests haven't been working for a while on my site, and even manually entering the URL in my browser isn't triggering any digests.

Nick

nickharambee commented 10 years ago

Just to add that I have used the Cron View plugin to see what cron jobs are upcoming, and only ass_digest_event_weekly shows, i.e. the Weekly digest, not the daily digest.

r-a-y commented 10 years ago

The daily digest hook is called "ass_digest_event".

If you are not seeing this, then try deactivating and reactivating the plugin as GES resets the cron hooks during these events.

nickharambee commented 10 years ago

Thanks ray.

I have reactivated the plugin and now "ass_digest_event" is showing.

Do you have any idea why manually visiting http://[mysite.com]/wp-cron.php isn't triggering the emailing of digests and everything is remaining in the queue?

Nick

r-a-y commented 10 years ago

wp-cron.php still adheres to WP's cron schedule. Since our GES hooks are scheduled on a daily and weekly basis, navigating directly to wp-cron.php does not do anything until those intervals are hit (daily and weekly).

Also, since your daily digest is probably backlogged, the daily digest for each user might be huge.

It also might be interesting to determine how the daily digest hook was removed to begin with.

nickharambee commented 10 years ago

Thanks again ray. I set the time of the daily digests to now and the digest emails did send this time. It seems that reactivating the GES plugin fixed the issue. Having done some research on cron jobs in Wordpress I have previously added define('DISABLE_WP_CRON', true); to wp-config.php and then added a cron job to run once a day in CPanel - php -q -f /home/admin/domains/[mysite.com]/public_html/wp-cron.php Not sure how this affects the GES plugin though. Any advice on the optimal setup would be appreciated.

r-a-y commented 10 years ago

If you are disabling wp-cron and running cron from a real cronjob, did you add the doing_wp_cron parameter?

That might be the part you're missing: /wp-cron.php?doing_wp_cron

Also see: http://bitswapping.com/2010/10/using-cron-to-trigger-wp-cron-php/

nickharambee commented 10 years ago

Yes, I did add the doing_wp_cron parameter. I think I will enable wp-cron and see how I go with this for now. Out of curiosity, why did the Daily Digest time setting still trigger a digest when wp-cron is disabled?