Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • Ben August 18
How are duplicate emails avoided and how does this relate to the cron (schedule.php)?
  • Vote Up0Vote Down Richard1Richard1
    Posts: 1Sendy user

    I've read a few different discussions where people have had issues with duplicate emails. Some of these are very old threads or were issues with SES so are no longer relevant but it got me thinking - what steps are in place that prevent duplicate emails being sent?

    Here's a couple of scenarios I'm slightly concerned about before I start using Sendy:

    1. If you schedule an email it looks like the schedule.php script is the one that deals with the send (as part of its 5 minutely execution). Is that correct?
    2. There are a lot of posts which say Don't schedule the cron more frequently than every 5 minutes because you might run into issues but I'd like to know what issues these are. (perhaps to do with heading off race conditions)
    3. If I click the button to send out a campaign to a list immediately and it's in the process of sending when the cron runs, is there a chance the cron's process will attempt to start sending the email out?

    Cheers!

  • 1 Comment
  • Vote Up0Vote Down BenBen
    Posts: 3,507Sendy support

    Hi,

    If you schedule an email it looks like the schedule.php script is the one that deals with the send (as part of its 5 minutely execution). Is that correct?

    Yes the scheduled.php script is the one sending scheduled emails out. It also sends email campaigns that are being sent immediately (non-scheduled). It is also responsible for resuming sending of campaigns when your server times out while sending.

    There are a lot of posts which say Don't schedule the cron more frequently than every 5 minutes because you might run into issues but I'd like to know what issues these are. (perhaps to do with heading off race conditions)

    If you follow the official instructions, you’d be fine. The official instructions for the timing of the scheduled.php cron job is every 5 minutes, not anything more and not anything less. Some people thought that if they set it to run every 1 minute, it will send the campaign ‘faster’. This is wrong, there are no official word anywhere that says you should do this. If you do anything out of what is officially instructed, then there will be problems - problems like your email getting sent multiple times to each recipient or your campaign get stuck in sending status.

    If I click the button to send out a campaign to a list immediately and it's in the process of sending when the cron runs, is there a chance the cron's process will attempt to start sending the email out?

    Sorry but I don’t understand this question. If you proceed to send a campaign immediately, the campaign was previously in ‘Draft’ status, so it wasn’t sending.

    All in all, if you setup the cron job as per the official instructions, send or schedule your campaigns as per normal and don’t do anything out of the ordinary based on unfounded theories, you will be fine.

    Thanks.

    Best regards,
    Ben

This discussion has been closed.
All Discussions