Jump to content

Recommended Posts

I have a newsletter system that is coded with php to mysql.  It is trying to do almost 60,000 emails.  Everything works fine except at around 2,000 emails which is around 2-3 hours worth of processing the script always seems to stop running.  is there a setting or a command that I can run to keep it running until the end?  I can provide the code if needed but thought maybe it is a simple comand i can just insert (i hope)

Link to comment
https://forums.phpfreaks.com/topic/198363-php-that-stops-executing-after-2-hours/
Share on other sites

put

set_time_limit(0);

at the top of the script. To be honest you would be better queueing these up in a mysql table and sending them in small batches every so many minutes (say 200 every 15 minutes) and help spread the load over time - That plus you can have the same script running multiple times. By your current guesses the 60000 could last between 60 to 90 hours, which is madness to be honest

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.