You're right, it would create more possible points of failure but the only
failure so far is timeouts from a remote user. It's way too fast locally to
timeout so the chances of failure would really be less from what I can tell.


As for deciding how many cfscchedules to make, that would be some pretty
basic math. 

Something like this should do the trick...

<cfset totalEmails = 10001 />
<cfset emailsPerBatch = 1000 />
<cfset totalBatches = round(totalEmails / emailsPerBatch) />

<cfif totalEmails MOD emailsPerBatch neq 0>
        <cfset totalBatches = totalBatches + 1 />
</cfif>

Without testing... that SHOULD spit back 11

....or just add the stragglers to the last batch.

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 

 


-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED] 
Sent: Sunday, September 03, 2006 1:17 PM
To: CF-Talk
Subject: Re: mass emailing from CF

On 9/3/06, D F <[EMAIL PROTECTED]> wrote:
> The logic seems fine to me.

If you are sending 10k emails then you are hoping that 10 processes
run properly, rather than one.  I see that as a tenfold increase in
potential points of failure.   Sure you can add a 'Stage X complete'
email at the end of each send process but that doesn't address the
problem, or help solve it... only create the ability to spot a problem
with your solution.

And what happens when you need to send 11,000?  Or 10,001?  You need
to create a scheduled 11th process.  And then a 12th.  That means you
either have to babysit your maillist count so you can manually add
another task or write in code that divides the total list by 10 and
run only group 1 of 10, 2 of 10 etc. Which is also not scaleable since
you will, sooner or later, exceed whatever your max batch size is (and
leading up to that you will watch performance decrease since you
haven't addressed the root problem) and have to create Schedule Item
11, then 12 and so on.

Just some stuff that came immediately to mind.  If you have mail
capacity o connection issues I recommend ou address them directly.  CF
shouldn't be the problem.

-- 
[EMAIL PROTECTED]
Janitor, MSB Web Systems
mysecretbase.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251913
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to