Posted: October 5, 2022 at 9:42 am
Hello, We’ve noticed that our Registration Approved admin emails all send on the same day, usually once a month. So we’ll get 100+ registration emails at once. Could you please help us resolve this so the admin notifications are sent in real time? |
|
Hi there, That is highly unusual and it’s likely an issue related to WP Cron. Are your messages set to send on a separate or the same request? Go to Event Espresso > Messages. Next, click on the Settings tab and then scroll down to the Global Message Settings area. The setting for Generate and send all messages should be set to On a separate request or On the Same request. Setting the above to ‘On same request’ basically tells EE not to use WP_Cron for messages. Set it to the same request and save the page. Now to test message function using WP_Cron you’ll need to add a test registration to an event and finalize the registration. Then go to Event Espresso -> Messages -> Message activity You should have a message generated and sent. |
|
Hi Garth, Thanks for your help. I’ve updated these settings and will send a test registration. I’ll let you know as soon as we have a verdict. |
|
Looks that solved the problem! Thanks again, Garth. |
|
Hi there, So currently you have EE set to send messages ‘On same request’ in the settings, correct? As Garth mentioned, that means EE no longer uses WP_Cron to send your emails and just does so on the same request that ‘triggered’ the email. Which technically is fine, but combine that with the fact that your emails weren’t sending other than 1 day of the month (and a specific day at that) that leads me to believe that WP_CRON has been disabled on your site and your host has set up a real cron to run… but once a month? WP_CRON puts extra load on the server, it’s a ‘sudo’ (aka fake) cron schedule in that it allows you to set schedules in WordPress to do something like ‘run once every day’. However, the way it does that is to check if a task has been scheduled on every single request to your site, basically adding another request every time a visitor views a page on your site. On every page load, WP_CRON says: ‘Any tasks scheduled….. nope!’ Next page load: ‘Any tasks scheduled….. nope!’, Then on the next, maybe: ‘Any tasks scheduled….. Oh hey! A task to run, lets run that one!’, Next: ‘Any tasks scheduled….. nope!’, And so on. A ‘real’ cron just sits waiting and runs at a specific date/time to run the tasks it has been set to do, which is much more efficient. You can’t create those within WordPress itself, only the server and hence why WP has WP_Cron. Hosts will often disable WP_CRON and setup a real cron to reduce the load taken by the above, but once a month is too long… WP_CRON is used not just by Event Espresso but a lot of other functions. If yu install this plugin: https://en-gb.wordpress.org/plugins/wp-crontrol/ Then go to Dashboard -> Tools -> Cron Events… do you see a notice at the top of the page above WP_CRON being disabled? |
|
Hi Tony, Correct – I do see an error on the Cron Events page. “There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was: Unexpected HTTP response code: 403” |
|
Ah, that’s not so simple. WP Cron returning 403 can be caused by a lot. Who are you hosting with? |
|
The site is hosted at WP Engine. We’ve had good experiences with their tech support so if there’s anything we need to ask/request I’m sure they can handle it. |
|
Any security plugins active on the site? An error of 403 – Forbidden can happen for many reasons but it’s often an overzealous security rule blocking the request, or it’s possible WP Engine have blocked the request. I recommend opening up a ticket with them and ask them to confirm if they are blocking the requests to wp cron on your site. You can give them the same error from your reply above, they should know where to work from from there. |
|
I confirmed with WP Engine nothing on the server is blocking any wp cron requests, but they said the requests were not running. They recommended and enabled an alternate cron which should be more reliable. I can always ask them to disable this one if needed. |
|
Are the cron requests running properly now? |
|
It looks like they are. We should be set, we’ll reach out again if we run into any issues. Thanks for your help! |
|
Awesome, I’m glad it helped 🙂 |
|
The support post ‘Admin Registration emails only sending once a month’ 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.