Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17028

Yearly and Monthly Repeat Reminders send on every cron for 24 hours

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.6
    • Fix Version/s: 4.6.9
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      The current workaround for the Scheduled Reminders issue outlined in Scheduled annual membership reminders not sent after first year is to set a Schedule Reminder to repeat annually.

      However - as per Eileen's comment in that thread, "We enabled yearly repeats and the reminders started going out hourly (every cron)."

      We can confirm this behavior: if, as a workaround to resolve the issue where Schedule Reminders only send once, we set the Scheduled Reminder to repeat annually, the criteria that selects users is correct - but that same group of users will receive the Scheduled Reminder every time the Scheduled Reminder cron runs for a 24-hour period.

      In our client's case, the Scheduled Reminder cron runs every 5 minutes, and this bug resulted in some very confused members who received 12 renewal reminders in a 60-minute period.

      The problems are two-fold:

      First, the code added to consider Monthly and Yearly renewal reminders is getting passed as a string and defaulting to '24' - which explains why the users are getting spammed for that particular period of time.

      Second, the $havingClause was using the TIMEDIFF(number, datetime) function - and in newer versions of MySQL, that function returns NULL.

      We've created a patch to address this; I'll attach it momentarily.

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              aheath Anna Heath
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: