Why would you need to create all those cfschedules?  Just have one schedule run 
and check for unsent mail.  When your recordcount is down to zero, just delete 
the cfschedule.   Or you can just let it run as there is minimal impact on 
checking a page that contains a query that doesn't return any records.

>...
> 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.
> 
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:252054
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to