What I do, and what I'd suggest, is a separate Mailer and Recipient table. Generate records for your day's worth of mail, into a recipients table, and periodically, throughout the day, select TOP x rows and send, then delete from the table.
What I do: Mailers ( MailerID int, BatchSize int, BatchIntervalSecs int, MailerDate datetime, MailerFromEmail varchar(100), MailerFromName varchar(100), etc. etc... - Then MailerMaxRowID, from some user table.... - this is inserted when you generate your recip list). Nightly, generate the next day's list, and have all recipient records inserted with the mailer ID for the given mailer (one per day, in your case). When you're done inserting, you should mark the max rowID of your user table in the mailer, so you know how many newly created accounts there are that day, and can deal with them separately. When you're done with that, use CFSCHEDULE to generate a batch process every <BatchIntervalSecs> seconds. When the query returns no results, use CFSCHEDULE to delete the task. All day long cfschedule churns through this list. Do you want me to opensource my implementation? I don't mind doing it if I have some free time on a weekend. Sorry if this is a bit confusing, but I'm in a rush. -dov -----Original Message----- From: Dave Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 3:52 PM To: CF-Talk Subject: RE: Need Suggestions for Spreading Out Notification Mailings Thanks everyone for your ideas. On this idea Bryan has, it makes sense (as do the others as well). I'm guessing what I would do here is that the last task of the day would basically send to everyone who didn't get it. That way I don't leave anyone out. So say I took my subscriber count, divided it by 96 (24*4), and ran the task every 15 minutes. I would just do a SELECT TOP (howmanytoget)... where mail_sent = 0 with the SQL and then if the time the task is running is 15 minutes or less from midnight, I would do a regular select where mail_sent = 0 (without the top) to ensure I've gotten everyone else that's left over (since the math won't be 100% accurate because the list is dynamic and changes size throughout the day). Sound like it will work? Any other feedback? I'm going to start working on it and will continue to look here for comments. Thanks everyone! Sincerely, Dave Phillips BizBreeze.com [EMAIL PROTECTED] 615-746-3851 -----Original Message----- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 1:43 PM To: CF-Talk Subject: Re: Need Suggestions for Spreading Out Notification Mailings Easy like pie ;-) 1) schedule a task to run at the desired intervals 2) task checks for all members that haven't yet recieved todays mailing 3) send mail to the first X members that have yet to get todays mailing 4) update the flag for those getting sent the mailing 5) clear out all flags at midnight and stat fresh So you'll need to alter you tables to contain a boolean (yes/no) column (called Mail_Sent). You'll also need to pick a decent interval (not so close that the first task has time to complete). To pick the number of folks to send to at each interval I'd do some simple math...total number of members divided by number of intervals gives you number to send each interval (you can do this dynamically of course as your membership fluctuates). That's the broad brush stroke for ya...hope it helps Cheers Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com/54 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184469 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

