Question

Photo of Matthew Meekins

0

Duplicate Emails

I'm on Rock 4.0 beta. There are certain emails that are going out that people are getting duplicates of. Some of them are system emails and some are user created communications. It seems like my send communications job is running normally. Any ideas why this might be happening? 

  • Matthew Meekins

    If any of the jobs that sends a communication runs automatically, it will create and send multiple emails. If I click the "Run Now" button, it only sends 1 email.

  • Photo of David Leigh

    0

    Matthew,

    Perhaps try reducing the frequency with which the Send Communications job runs (ie. change 5min interval to 10mins) and see if that reduces/removes the incidence of duplicates?
    I'm not sure, but it's possible that the job is running again before it has completed the first time, so there may be some processing overlap and this may create the duplicates.

     

    • Matthew Meekins

      It's not just the Send Communications job. The Send Attendance Reminders job and the Send Following Suggestion Notification job are sending multiples. The strange part is, if I just click on the "Run Now" button, they each only send 1 email. And I know it's not something weird in Mandrill (our email client) because Rock is actually creating multiple communications when the job runs automatically.

    • David Leigh

      So if you try my suggestion and change the frequency of all these notification jobs to avoid overlaps, do you still get multiple emails?
      The other question that occurs to me is whether you are running multiple sites, possibly against the same database? I've had some duplicate emails for this reason in the past.

    • Matthew Meekins

      I did try your suggestion of changing the frequency of each job. I even turned off the other jobs and ran just one. I've tried a bunch of stuff! haha.... I do, however have multiple sites on my rock database. What did you do to fix that when you ran into it?

    • David Leigh

      I stopped running both sites at the same time against the same database! I think the problem will also go away if you disable the IIS Job Scheduler for your second website. Go to "Home/System Settings/System Configuration" and uncheck the "Enable Run Jobs in IIS Context" to prevent the scheduler from running in that website instance.

    • David Leigh

      No. So long as you have the IIS job Scheduler enabled for only one of the websites, the jobs will run in that website instance and not in any of the others.

    • Matthew Meekins

      Ok, so I gave that a whirl and I get an exception every time I try to turn it off. Starts with this,
      "Error
      Access to the path 'C:\Inetpub\vhosts\therenovation.cc\httpdocs\fqwacyj4.tmp' is denied."

    • David Leigh

      Seems like there is a permissions problem saving changes, possibly in the configuration file.


      The other way to switch off the IIS Job Scheduler is by editing the web.config file directly.
      Just find and change the "RunJobsInIISContext" setting to "false".

    • Matthew Meekins

      I figured out the permissions problem and I was able to turn off the IIS Job Scheduler. I'm not sure how that would help because the jobs don't run at all with it off.


      I probably should have clarified earlier too... I only have one "internal" admin dashboard, but multiple subdomains that are "external" sites created within Rock. Is there a reason that the system would be sending an email for each "site" I've created with Rock?

    • David Leigh

      That's a different situation entirely. The solution I offered is only relevant if you are running multiple IIS websites that access the same Rock database. Each site within Rock is just another set of pages in the same IIS website, so I don't see any reason why that would trigger multiple emails. However, if the problem goes away after you disable IIS Job Scheduling and then run the Jobs manually, it at least narrows down the problem to the Job Scheduler running the same job multiple times rather than the job itself malfunctioning.

    • Matthew Meekins

      That's what I thought. Sorry I didn't make my situation clear.


      The problem only happens when the job runs automatically. Whenever I just click the "run" button I only get one email.


      Also, the Get Scheduled Payments job has never worked correctly when set to run automatically either. We run that manually. It seems like they may be connected but I'm not skilled enough to figure that out.