Posted: May 24, 2023 at 7:37 am
We had set WP_Cron manually through cpanel to setup news feeds in the system. Currently only one event was active in Event Espresso and others were all inactive. But when we added wp cron job through cpanel, it triggered emails to some attendees who registered for the event that ended more than a month ago. How did it happen? Why were these emails triggered from the system? Recently we also performed an upgrade on the Event Espresso database. This is very embarrassing as the event is already over. |
|
Hi there, When we’ve seen this in the past it was because the emails were sitting in the queue waiting to generate from a previous issue with WP Cron or something happening during the generation of the emails. Fixing WP Cron then triggered the job to generate and send the emails. Do you know if these emails a ‘duplicate’ of previous emails sent? As in did the emails send for the event previously when the user registered and now they’ve received another copy? Do you have a database backup from some point close to before you setup the cron job through cPanel? I can check to see if messages are waiting to generat within that if if you do. |
|
Hi Tony, Please see your answers below after ***: – Do you know if these emails a ‘duplicate’ of previous emails sent? – As in did the emails send for the event previously when the user registered and now they’ve received another copy? – Do you have a database backup from some point close to before you setup the cron job through cPanel? NOTE: We have email logs plugin and I took a website backup before setting up the WP Cron job, there I didn’t see any emails being in queue. |
|
Hi Tony, Awaiting your response. |
|
Hi Tony, Any updates? |
|
Hi Tony, Did you get a chance to review my below email: Please see your answers below after ***: – Do you know if these emails a ‘duplicate’ of previous emails sent? – As in did the emails send for the event previously when the user registered and now they’ve received another copy? – Do you have a database backup from some point close to before you setup the cron job through cPanel? NOTE: We have email logs plugin and I took a website backup before setting up the WP Cron job, there I didn’t see any emails being in queue. |
|
Hi there, My apologies for missing this your replies here.
Host the file however you prefer and send a link for me to download to support[at]eventespresso.com For example .zip the file (password protect it if preferred) and send me the link. Or use a server such as Dropdox or WeTransfer to send it directly.
I’m referring to the EE message system queue rather than something you’ll see within email logs. Event Espresso -> Messages has its own system to queue, generate and ‘send’ emails (which you’ll then see in the mail log). |
|
This reply has been marked as private. | |
Hi Tony, Were you able to review the database I sent? What are your findings? |
|
Hi there, My apologies for the delay, I’ve been digging into this trying to reproduce the emails re-sending but unfortunately, I’ve not been able to. I checked your database and as you suspected, there aren’t messages sitting waiting to generate/send so ‘something’ retriggered the emails to send again within the messages system but without being able to reproduce it and view the stack trace/queries generated its extremely difficult to narrow this down further. I set up a local site running just Event Espresso and used your database locally to see if I could reproduce it (no emails will actually send from my localhost) but nothing so far has triggered the emails there. What exactly did you do with WP_CRON from your opening post? I’d really like to reproduce this if I can, triggering messages for expired events is not ideal nor expected. |
|
Hi Tony, I had set WP Cron job in cpanel following this url: And this was done to make sure that the News Feeds from “RSS Aggregator by Feedzy – Powerful WP Autoblogging and News Aggregator” could run properly. |
|
So all that actually does is create a ‘real’ cron on the server and stop WP_CRON from checking for tasks on every request. WP_CRON is a sudo cron, it can’t schedule tasks on the server itself so what it does is check for a task on every request in the background, meaning every single request that hits the site triggers a check within WP_CRON to see if there is a task to run. The above sets up a real cron to run every X mins which then calls the page WP_CRON would have to run the tasks. It’s a way make sure the WP Cron tasks run on X schedule without needing visitors to trigger the check. That doesn’t really change how EE messages work.
I can’t see anything within that add-on which could make messages retrigger. I’ll create a ticket to see if there is anything we can do to try and prevent this ut without being able to reproduce its going to be really difficult to narrows this down. |
|
The support post ‘Event Espresso triggering emails for an Inactive event’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.