Do the Antiflood and Throttler plugins (and maybe other parts of Swiftmailer and/or its plugins) use a cron task?
If so, how do they behave on websites where the ISP does not offer a cron task?
Antiflood, Throttler and Cron?
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Antiflood, Throttler and Cron?
They don't use cron. They just sleep().
Re: Antiflood, Throttler and Cron?
Good idea.Chris Corbyn wrote:They don't use cron. They just sleep().
I seem to remember that sleep() does not "consume" execution time (in terms of the maximum script execution time, 30 s or so by default). And if e-mails are intensively personalised, the advantage of clever caching will not help much, I guess.
But I presume the execution times for sending all e-mails will just add up, so much depends on the actual time needed per single e-mail message generated. So what happens if very(!) many e-mails have to be sent?
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Antiflood, Throttler and Cron?
If you have "very many" emails to send, use a cron script. PHP is not designed to run continuously, although it can be done.HHahn wrote:Good idea.Chris Corbyn wrote:They don't use cron. They just sleep().
I seem to remember that sleep() does not "consume" execution time (in terms of the maximum script execution time, 30 s or so by default). And if e-mails are intensively personalised, the advantage of clever caching will not help much, I guess.
But I presume the execution times for sending all e-mails will just add up, so much depends on the actual time needed per single e-mail message generated. So what happens if very(!) many e-mails have to be sent?
Setting set_time_limit(0) will remove the timeout on command line, but then if you're running in a browser window the browser will close the connection after X minutes anyway.
A PHP host without cron? How weird. Might I suggest you poke your host about that?