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) »
  • Membership Renewal Cron keeps sending reminder emails
Pages: [1]

Author Topic: Membership Renewal Cron keeps sending reminder emails  (Read 1502 times)

EvanDonovan

  • Guest
Membership Renewal Cron keeps sending reminder emails
November 12, 2008, 09:17:44 am
We got the membership renewal cron to work (thanks to those in the forums who helped!). However, we noticed that the cron keeps sending out emails each day that members in the Grace status do not renew. We don't want to send out these email more than once. Is there any way to set the cron so that it reminds people once and then leaves them alone?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership Renewal Cron keeps sending reminder emails
November 12, 2008, 10:00:13 am
The cron job should be clearing the reminder date for those memberships after it sends out the renewal messages, and this "should" prevent further reminders from being sent. Sounds like something in this expected flow is not happening. Please update your forum profile with complete info on version of CiviCRM, your CMS, php and mysql versions so we can investigate.
Protect your investment in CiviCRM by  becoming a Member!

EvanDonovan

  • Guest
Re: Membership Renewal Cron keeps sending reminder emails
November 14, 2008, 11:29:39 am
Here's our version data for you:

CiviCRM:     2.0.1
CMS:    Drupal 5.12
MySQL:    5.0.51a-community-log
PHP:    5.2.5

Hope that helps!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership Renewal Cron keeps sending reminder emails
November 14, 2008, 04:23:30 pm
I ran a quick test with the 2.0 version of UpdateMembershipRecord.php - and it properly cleared the Renewal Reminder record after sending the reminder email out (to a Grace status member). Since I can't recreate this - you'll need to debug it on your side. Assuming that you can browse your DB - you'll want to check whether the reminder_date column in the civicrm_membership table is being set to NULL after each reminder email is set.

You can add some debug / echo statements to the script as follows, which can verify what's happening:

Code: [Select]
// add next line
                            echo "pre-reminder=" . $dao->reminder_date . "<br />";

                            crm_update_contact_membership( array('id'             => $dao->membership_id,
                                                                 'reminder_date'  => 'null' ) );

// and then these 2 lines
                            $newReminder = CRM_Core_DAO::getFieldValue( 'CRM_Member_DAO_Membership',
                                                                        $dao->membership_id,
                                                                        'reminder_date', 'id' );
                            echo "new reminder=" . $newReminder . "<br />";
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership Renewal Cron keeps sending reminder emails

This forum was archived on 2017-11-26.