Clarke, I wouldn't rely on the server monitor as proof of whether the thread runs. For one thing, you have to have "start monitoring" enabled, which isn't on by default. Just thought I'd clarify that if it might be the only reason you don't see them. Even then, the threads could run very fast.
I'd recommend instead you go old school, and throw a CFLOG into the thread code (and outside the thread code) to write to a file that you can look at to confirm if it's ever written to. /charlie From: [email protected] [mailto:[email protected]] On Behalf Of Clarke Bishop Sent: Wednesday, May 27, 2009 5:52 PM To: [email protected] Subject: RE: [ACFUG Discuss] Sending large numbers of eMail via ColdFusion Thanks for the ideas Troy, Dawn, and Doug! I decided to try out cfthread as my code was already much like what Troy suggested. Here's what I have now: <cfthread name="sendPR" action="run"> <cfloop query="qEmails"> <cfif qEmails.personalized EQ True> <cfset personalMessage = qEmails.message> <cfelse> <cfset personalMessage = ""> </cfif> <cfset sendMail(qEmails.eMail, subjectMsg, personalMessage, Template)> <cfset sleep(1000)> </cfloop> </cfthread> The only thing is the thread doesn't seem to run. The above code is inside a CFC function, and the sendMail() call goes to another method in the same CFC? I saw an example on the web where someone did this, so I think it's OK. Any ideas what I might be doing wrong? Also, are there good ways to trouble-shoot with cfthread. The code runs correctly when I comment out the cfthread tags. But when they are in there, nothing seems to happen. No thread ever shows up in the Server Monitor. Thanks for any pointers! ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
