Hi to all,
I have been looking through the forums for an answer to my question and believe that
Random has an answer to my question, but to be honest I'm only a beginner and cannot adapt his code to my uses, so if somebody could spare a little code my way I'd be amazingly grateful.
So here goes my problem.
I runa a mailing list (approx 25,000 subscribers) with a perl script. No problems until i try to mail everybody and at this point the script times out after about 10,000 mails forcing me to send the mail in three batches.
This is a little bit of a pain. Is there a way of automating the process.
Here is the code i use:
...beginning of subroutine
$pid = fork();
$pid;
if ($pid) {
print "The mailing has began";
exit(0);
}
else {
close (STDOUT);
...actual mailing
Now, I am convinced that it is possible to avoid the timeout problem using multiple forks. Is that a possibility?
Or is there something better?
Thanks a lot for your help,
Adrien
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.