Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

in my project, i need to send emails to the registered members of the site once every month. For this, i have setup a cron job on cpanel and it is working fine.

Whats my doubt is that, tomorrow the number of users in the site will increase and there would be thousands of users. Then does the cron job work as usual ?

I want to know, whether the cron can handle the task of sending emails to thousands of users at a time.

Please help.

share|improve this question
    
I depends. How do you do the sending itself? It is not the cron what is doing the delivery, is it? –  cstamas Oct 18 '10 at 12:26
    
Yes, the cron is calling a php script that loops the users in the database and sends mail to them. So i need to worry only about the script ,and leave beside the cron ? –  shasi Oct 20 '10 at 13:04
add comment

2 Answers 2

If you are sending messages out to multiple thousands of users on a regular basis a cron job technically should be able to do it, but is it right for you and your users?

A mailing list manager app (e.g. MailMan) might be more appropriate. It may be configured to send the messages in a way that is less likely to fall foul of spam filters, will help you manage who gets sent the messages, and should allow recipients to opt out. You can still set up a cron job to trigger the sending of the message on a scheduled basis - I believe that is a more sustainable way of sending bulk messages.

share|improve this answer
    
Thanks for your answer dunxd... iam impressed. I got atleast some confidence that my cron script can work with thousands of users in the database. But iam also curious to know how i can use mailman in cron to send the mail to all users ? Please note that my php script first queries the database and then filters the users based on a particular condition, and then loops through them, and sends mail to them. –  shasi Oct 20 '10 at 13:05
    
You could just use cron to send the message to the email address for the list - mailman would then handle sending the message to the list members. Pretty simple. Of course, you have to think about exactly how you configure your mailman list according to your requirements, but most things are possible. –  dunxd Oct 20 '10 at 13:52
add comment

I had exactly this problem and so I create The Fat Controller to solve it. The Fat Controller is basically a daemon written in C that can periodically run other programs, for example your script to send the next x emails.

The trick is that it can run many instances of a script at once.

I wrote about this particular use case: http://www.4pmp.com/fatcontroller/use-cases/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.