CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Contact receives renewal reminder during every cron run on 4.1
Pages: [1]

Author Topic: Contact receives renewal reminder during every cron run on 4.1  (Read 1888 times)

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Contact receives renewal reminder during every cron run on 4.1
March 11, 2012, 06:34:20 pm
We've just updated to version 4.1 this morning. On every cron run, folks who are within the renewal reminder period are receiving the reminder email. Since cron runs 4 times an hour, one patron received the reminder email 24 times today! We are running the Membership reminder date processor and Membership status processor jobs; are these mutually exclusive? On the old individual cron jobs, one would overwrite the other and cause multiple reminders but I thought consolidated cron would fix this problem. What's the correct solution for this?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Contact receives renewal reminder during every cron run on 4.1
March 11, 2012, 07:29:36 pm

pretty sure consolidated cron did not solve that issue. It basically implemented a unified protocol that all cron jobs now respect. Dependency between cron jobs has not yet been addressed.

Not sure if folks are aware of the issues when both jobs are run

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: Contact receives renewal reminder during every cron run on 4.1
March 11, 2012, 07:43:29 pm
Ahh, I see. End users definitely aren't aware of the interaction between these two jobs and the problems it will cause. Now they're both in the UI, easy to turn on and are described in the UI in a way that Joe User will think he should turn on both of them. But this will cause huge problems for customer service as contacts get spammed with reminder emails.

I looked through the code and found the issue. The call to process_membership_reminder_date finds all memberships whose reminder date is NULL and sets a date for it, so a reminder will be sent when process_membership is run. However, process_membership finds all memberships that have a reminder date, sends the reminder if necessary, and then sets the reminder date back to NULL.

As you can see, this leads to an infinite loop of contacts receiving reminder emails; I think this is a bug since the new cron didn't remove the function for process_membership_reminder_date or account for reminders that were already sent. Is there a use case for process_membership_reminder_date to continue to exist, since adding and renewing memberships sets a reminder date? It seems that this job can only cause harm to unsuspecting users.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contact receives renewal reminder during every cron run on 4.1
March 12, 2012, 07:14:28 pm
Good analysis of the issue. I had also noticed this a week or so ago but hadn't come up w/ a solution until re-discussing w/ colleagues today. We'll force disable this job and disallow enabling - which will prevent folks from running it unintentionally:

http://issues.civicrm.org/jira/browse/CRM-9868

I've also added a warning in the doc at:
http://wiki.civicrm.org/confluence/display/CRMDOC41/Managing+Scheduled+Jobs
Protect your investment in CiviCRM by  becoming a Member!

planigan

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
    • Allegheny CleanWays
  • CiviCRM version: 4.1.0
  • CMS version: Drupal 6.24
  • MySQL version: 5.0.90
  • PHP version: 5.2.13
Re: Contact receives renewal reminder during every cron run on 4.1
April 03, 2012, 09:48:00 am
We just ran into this issue today. Luckily I heard it about from a good friend of our organization. I have never been so happy to have so few dues paying members...

So, I read through the documentation and I'm still a little unclear about when (if ever) process_membership_reminder_date should be run. Obviously it can't be run automatically. So when is it required to actually set the reminder dates from NULL?
« Last Edit: April 03, 2012, 04:47:50 pm by planigan »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contact receives renewal reminder during every cron run on 4.1
April 05, 2012, 11:25:21 pm
The only reason for running that job is if you configured the Renewal Reminder Day setting in your membership types AFTER you've already started adding memberships into CiviCRM. In that case, running that job once will populate the proper renewal reminder date for each existing membership record based on the memberships' End Date minus Renewal Reminder Days.
Protect your investment in CiviCRM by  becoming a Member!

planigan

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
    • Allegheny CleanWays
  • CiviCRM version: 4.1.0
  • CMS version: Drupal 6.24
  • MySQL version: 5.0.90
  • PHP version: 5.2.13
Re: Contact receives renewal reminder during every cron run on 4.1
April 06, 2012, 07:50:55 am
Ahhh got it. I think the confusing part is that there seem to be a few scheduled jobs in the list that aren't actually supposed to be "scheduled". Semantically, they're more like maintenance tasks.

Thanks for clearing that up though!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Contact receives renewal reminder during every cron run on 4.1

This forum was archived on 2017-11-26.