Webcat listserver - WAS - Re: webcat method for waiting specific amount of time?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 27609
interpreted = N
texte = A while back there was thread on this list about using webcat to send a newsletter issue to a db of subscribers that contained many 1000's of records. Joseph D'Andrea then pointed out that it will crash at least the MacOS if you try to do all those [sendmail]s at once. WebDNA support suggested using the meta-refresh HTML tag to seperate the batches. Ken and J Lane have graciously given the URLs of their favorite free listservers which apparently do much more than the below code to manage sending out newsletters. But since I have already written the following, someone may for some odd reason find it useful... :-)-JohnPS - if any Unix gurus listening (I am on Linux, Redhat 6), please tell me if 50 [sendmails] a minute is reasonable. *************First have a db that contains all your newsletter subscribers. Imagine it has only valid email addressed in it (since with this webcat code I am not accounting for all the lame email addresses in the db, plus God knows what other potential problems that good listserver software deals with). Mine is called- Subscribers.db. It has a 'subscriberNum' field that is simply a progressive number count (every new subscriber gets a-one-larger-number). It has a 'EmailAddress' field (obvious), and a 'SentThisPass' field.Then Create a db called- E-broadcastPass.dbMake its contents= yoBroadcastPass¬ friend ¬Create a text file with permissions (if Unix) to allow it to be written over via [writefile] called inc-EissueBody.txt. I put mine in a folder called NobodyPerms.Then create an admin page with a form with two inputs, one is the textarea (name=e-IssueBody) where the admin inputs the body content of the newsletter issue, the other input is a hidden input with name=BroadcastPass and value=0. Form action=Eissuer.tplHere's the code for Eissuer.tpl-(email me off list if your email app messes it up and you want a clean copy attached and sent to you) _______________________ [include file=inc-protect.txt&raw=F&groups=ADMIN] [!]---the formvariables initially coming in are [BroadcastPass]=0&[e-IssueBody]=newsletter content-----[/!] [search db=NobodyPerms/Subscribers.db&neSentThisPassdata=yes&max=50] [showif [URL][BroadcastPass][/URL]=0] [Replace db=NobodyPerms/Subscribers.db&nesubscriberNumdata=nada_amigo]SentThisPass=no[/Replace] [Replace db=NobodyPerms/E-broadcastPass.db&eqyodatarq=friend]BroadcastPass=0[/Replace] [WriteFile NobodyPerms/inc-EissueBody.txt][e-IssueBody][/WriteFile] [/showif] [showif [URL][numFound][/URL]!0][/showif] [showif [URL][numFound][/URL]!0]Everyone subscribed is now being issued the ezine you submitted[/showif][showif [URL][numFound][/URL]=0]All issues sent![/showif] [founditems] [!]--------Begin Sendmail to all ezine subscribers-----------[/!] [sendmail to=[EmailAddress]&from=you@yerdomain.com&subject=how lovely, issue-[date]] [include inc-EissueHead.txt][include NobodyPerms/inc-EissueBody.txt] _____________________________ [include inc-EissueFoot.txt] [/sendmail] [!]----------End Sendmail to all ezine subscribers-----------[/!] [Replace db=NobodyPerms/Subscribers.db&eqsubscriberNumdatarq=[subscriberNum]]SentThisPass=yes[/Replace] [/founditems][Replace db=NobodyPerms/E-broadcastPass.db&eqyodatarq=friend]BroadcastPass=[math show=T][lookup db=NobodyPerms/E-broadcastPass.db&lookInField=yo&value=friend&returnField=BroadcastPass¬Found=0]+1[/math][/Replace][showif [URL][numFound][/URL]!0]

Everyone subscribed is now being sent the issue you submitted.
We are in the middle of sending issues to:

subscribers [math show=T]([lookup db=NobodyPerms/E-broadcastPass.db&lookInField=yo&value=friend&returnField=BroadcastPass¬Found=0]-1)*50[/math] - [math show=T][lookup db=NobodyPerms/E-broadcastPass.db&lookInField=yo&value=friend&returnField=BroadcastPass¬Found=0]*50[/math]

Absolutely do NOT interrupt this page's processing of this ezine broadcast which is now under way!! Do not close the window, view source HTML, hit the back button, stop button, go offline, or do anything else that might stop the meta-refresh from occuring. (Safest to NOT TOUCH ANYTHING! ;-) If you need to do some work, just create and use another browser window besides this one. You will know this broadcast is done when a heading here (in green) says so.

If this page does not automatically refresh itself in 1 minute (cause you lost your internet connection, or whatever), then you can reload the page yourself (using the browser's reload button)... then just let it continue... But DO NOT go back and submit the ezine-body-content form again, from scratch - this would cause the whole thing to start over as if no one had received it yet before it got interrupted, thus causing those before the interrupt to receive it twice....

[/showif][showif [URL][numFound][/URL]=0] [Replace db=NobodyPerms/Subscribers.db&eqSentThisPassdatarq=yes]SentThisPass=no[/Replace]

Everyone subscribed has been sent the issue you submitted, hope they enjoy it! ;-)

(All records in db have been reset to 'SentThisPass'="no")

All done! You can now do what you want with this window.

[/showif][COMMITDATABASE NobodyPerms/Subscribers.db][COMMITDATABASE NobodyPerms/E-broadcastPass.db][!]----good solution, except that no feedback HTML is ever displayed until the very end... :-( [WaitForFile file=nada_amigo.txt&timeout=60][/WaitForFile] [hideif [URL][numFound][/URL]=0][REDIRECT ADM-Eissuer.tpl?no_cache=[date %Y%m%d%m%S]][/hideif] ------[/!][showif [URL][numFound][/URL]=0]


admin navigation links go here [/showif] [/search] _______________________________________goto the admin page, input the newsletter body, and submit! ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
A while back there was thread on this list about using webcat to send a newsletter issue to a db of subscribers that contained many 1000's of records. Joseph D'Andrea then pointed out that it will crash at least the MacOS if you try to do all those [sendmail]s at once. WebDNA support suggested using the meta-refresh HTML tag to seperate the batches. Ken and J Lane have graciously given the URLs of their favorite free listservers which apparently do much more than the below code to manage sending out newsletters. But since I have already written the following, someone may for some odd reason find it useful... :-)-JohnPS - if any Unix gurus listening (I am on Linux, Redhat 6), please tell me if 50 [sendmails] a minute is reasonable. *************First have a db that contains all your newsletter subscribers. Imagine it has only valid email addressed in it (since with this webcat code I am not accounting for all the lame email addresses in the db, plus God knows what other potential problems that good listserver software deals with). Mine is called- Subscribers.db. It has a 'subscriberNum' field that is simply a progressive number count (every new subscriber gets a-one-larger-number). It has a 'EmailAddress' field (obvious), and a 'SentThisPass' field.Then Create a db called- E-broadcastPass.dbMake its contents= yoBroadcastPass¬ friend ¬Create a text file with permissions (if Unix) to allow it to be written over via [writefile] called inc-EissueBody.txt. I put mine in a folder called NobodyPerms.Then create an admin page with a form with two inputs, one is the textarea (name=e-IssueBody) where the admin inputs the body content of the newsletter issue, the other input is a hidden input with name=BroadcastPass and value=0. Form action=Eissuer.tplHere's the code for Eissuer.tpl-(email me off list if your email app messes it up and you want a clean copy attached and sent to you) _______________________ [include file=inc-protect.txt&raw=F&groups=ADMIN] [!]---the formvariables initially coming in are [BroadcastPass]=0&[e-IssueBody]=newsletter content-----[/!] [search db=NobodyPerms/Subscribers.db&neSentThisPassdata=yes&max=50] [showif [url][BroadcastPass][/URL]=0] [Replace db=NobodyPerms/Subscribers.db&nesubscriberNumdata=nada_amigo]SentThisPass=no[/Replace] [Replace db=NobodyPerms/E-broadcastPass.db&eqyodatarq=friend]BroadcastPass=0[/Replace] [WriteFile NobodyPerms/inc-EissueBody.txt][e-IssueBody][/WriteFile] [/showif] [showif [url][numFound][/URL]!0][/showif] [showif <a target="_parent" href="page.dna?numero=89">[url]</a>[numFound][/URL]!0]Everyone subscribed is now being issued the ezine you submitted[/showif][showif <a target="_parent" href="page.dna?numero=89">[url]</a>[numFound][/URL]=0]All issues sent![/showif] [founditems] [!]--------Begin Sendmail to all ezine subscribers-----------[/!] [sendmail to=[EmailAddress]&from=you@yerdomain.com&subject=how lovely, issue-[date]] [include inc-EissueHead.txt][include NobodyPerms/inc-EissueBody.txt] _____________________________ [include inc-EissueFoot.txt] [/sendmail] [!]----------End Sendmail to all ezine subscribers-----------[/!] [Replace db=NobodyPerms/Subscribers.db&eqsubscriberNumdatarq=[subscriberNum]]SentThisPass=yes[/Replace] [/founditems][Replace db=NobodyPerms/E-broadcastPass.db&eqyodatarq=friend]BroadcastPass=[math show=T][lookup db=NobodyPerms/E-broadcastPass.db&lookInField=yo&value=friend&returnField=BroadcastPass¬Found=0]+1[/math][/Replace][showif [url][numFound][/URL]!0]

Everyone subscribed is now being sent the issue you submitted.
We are in the middle of sending issues to:

subscribers [math show=T]([lookup db=NobodyPerms/E-broadcastPass.db&lookInField=yo&value=friend&returnField=BroadcastPass¬Found=0]-1)*50[/math] - [math show=T][lookup db=NobodyPerms/E-broadcastPass.db&lookInField=yo&value=friend&returnField=BroadcastPass¬Found=0]*50[/math]

Absolutely do NOT interrupt this page's processing of this ezine broadcast which is now under way!! Do not close the window, view source HTML, hit the back button, stop button, go offline, or do anything else that might stop the meta-refresh from occuring. (Safest to NOT TOUCH ANYTHING! ;-) If you need to do some work, just create and use another browser window besides this one. You will know this broadcast is done when a heading here (in green) says so.

If this page does not automatically refresh itself in 1 minute (cause you lost your internet connection, or whatever), then you can reload the page yourself (using the browser's reload button)... then just let it continue... But DO NOT go back and submit the ezine-body-content form again, from scratch - this would cause the whole thing to start over as if no one had received it yet before it got interrupted, thus causing those before the interrupt to receive it twice....

[/showif][showif [url][numFound][/URL]=0] [Replace db=NobodyPerms/Subscribers.db&eqSentThisPassdatarq=yes]SentThisPass=no[/Replace]

Everyone subscribed has been sent the issue you submitted, hope they enjoy it! ;-)

(All records in db have been reset to 'SentThisPass'="no")

All done! You can now do what you want with this window.

[/showif][COMMITDATABASE NobodyPerms/Subscribers.db][COMMITDATABASE NobodyPerms/E-broadcastPass.db][!]----good solution, except that no feedback HTML is ever displayed until the very end... :-( [WaitForFile file=nada_amigo.txt&timeout=60][/WaitForFile] [hideif [url][numFound][/URL]=0][REDIRECT ADM-Eissuer.tpl?no_cache=[date %Y%m%d%m%S]][/hideif] ------[/!][showif [url][numFound][/URL]=0]


admin navigation links go here [/showif] [/search] _______________________________________goto the admin page, input the newsletter body, and submit! ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to John Butler

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCat2final1 crashes (1997) Search Question (2003) multi-paragraph fields (1997) Plugin or CGI or both (1997) Triggers Suck! (2000) Problem 2: Prefs file... (1997) Locking up with WebCatalog... (1997) ShowNext (1997) Sort Order on a page search (1997) WebCat 3.04-3.07 plug-in dying on server.... (2000) Re[2]: SSL data to/from webcatalog? (2000) &fieldsdir=ra truely random?? (2000) Re:no [search] with NT (1997) Quit revisited (1997) template not found error (1998) Cart Transfer from Un-Secure to Secure (2000) WebCat2.0b15-to many nested [xx] tags (1997) Web Catalog Instability (2000) choice of images (2000) [SearchString] usage (1997)