By CK on Thursday, 31 October 2013
Posted in Technical Issues
Replies 5
Likes 0
Views 756
Votes 0
As I am using mandrill to send my emails, is there anyway that I can have my system send an email instantly (instead of waiting for the cron)?
Hello CK,

Only selected e-mails (during registrations and moderating) are sent immediately but regardless if you are using Mandrill or not, it's still pretty heavy to send all the e-mails at once. Imagine if a stream has 50 different users that comments on the stream. Notifying 50 users at a time, would definitely cause the php scripts to time out
·
Thursday, 31 October 2013 00:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark,

So that I have a better understanding, what/how does the cron job help address the potential problem?

For clarity would you mind explaining the following, say there are 50 emails in the queue, and the cron job is set to process 20 email at a time (with a frequency of 1 minute), will it send only 20 emails and then stop and wait another minute to process the other 20 and so on until the queue is empty or will it send all the emails as soon as it is run but in a batches of 20 (so in this case it will process 2 batches of 20 and one batch of 10)?

Thanks in advance,
Chaim
CK
·
Thursday, 31 October 2013 02:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello CK,

Yep, that's right. Cronjob not only solves issues with timeouts but if you are going to enable sending e-mails on page load, your users is going to find the site to load very slow. Imagine the workflow below:

1. User's post a comment
2. EasySocial sends e-mail

-- This onwards will run as many times as it needs to. If you have 100 e-mails, it processes 100 times
3. Joomla's mailer api creates a connection to the SMTP server
4. Waits for the result from the SMTP server
----
5. Done
·
Thursday, 31 October 2013 02:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark,

will setting my cron job to execute every minute slow the server down?

I want my users to receive "instant" notifications such as is done on FB, and Twitter.

Thanks,
Chaim
CK
·
Monday, 16 November 2015 01:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ck,

It totally depends on the amount of emails that need to be processed and the speed of your server. If you have a lots of users on your site, it is recommended to set your cronjob interval at around 5 minutes to reduce the workload of your server.
·
Monday, 16 November 2015 11:50
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post