Re: pausing a script
Can this script be used with cfschedule? Sebastian i use it for a client, and its ROCK solid. :) tw On 4/13/05, Will Tomlinson [EMAIL PROTECTED] wrote: Would Matt's Mail trickler be another option? http://mysecretbase.com/Slowing_Down_CFMail_2004.cfm Will ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203127 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
Re: pausing a script
Would Matt's Mail trickler be another option? http://mysecretbase.com/Slowing_Down_CFMail_2004.cfm Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202531 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
Re: pausing a script
i use it for a client, and its ROCK solid. :) tw On 4/13/05, Will Tomlinson [EMAIL PROTECTED] wrote: Would Matt's Mail trickler be another option? http://mysecretbase.com/Slowing_Down_CFMail_2004.cfm Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202533 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: pausing a script
There's no need for the javacast. You can simply do Thread.sleep(1000*60); -nathan strutz Taco Fleur wrote: cfscript Thread = createObject( java, java.lang.Thread ); Thread.sleep( javaCast( long, 1000*60 )); /cfscript ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202578 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
pausing a script
Is there a way of pausing a script in CF MX 6? I want to send out 200 emails, wait 60 seconds before executing another cfmail batch of 200. I have got the following code after the cfmail tag both of which are nested in an index loop which has a value from 1 to 12. cfset sec = Second(Now()) cfset secs = 0 cfset TimeSpan = 60 cfloop condition=secs LT TimeSpan cfif sec IS NOT Second(Now()) cfset sec = Second(Now()) cfset secs = secs + 1 /cfif /cfloop But the server hangs and has crashed once. Is there an elegant and efficient way to do this? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202518 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
RE: pausing a script
cfscript Thread = createObject( java, java.lang.Thread ); Thread.sleep( javaCast( long, 1000*60 )); /cfscript -- Taco Fleur Senior Web Systems Engineer http://www.webassociates.com -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 13 April 2005 1:04 PM To: CF-Talk Subject: pausing a script Is there a way of pausing a script in CF MX 6? I want to send out 200 emails, wait 60 seconds before executing another cfmail batch of 200. I have got the following code after the cfmail tag both of which are nested in an index loop which has a value from 1 to 12. cfset sec = Second(Now()) cfset secs = 0 cfset TimeSpan = 60 cfloop condition=secs LT TimeSpan cfif sec IS NOT Second(Now()) cfset sec = Second(Now()) cfset secs = secs + 1 /cfif /cfloop But the server hangs and has crashed once. Is there an elegant and efficient way to do this? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202519 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
RE: pausing a script
-Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 11:04 PM To: CF-Talk Subject: pausing a script Is there a way of pausing a script in CF MX 6? I want to send out 200 emails, wait 60 seconds before executing another cfmail batch of 200. I have got the following code after the cfmail tag both of which are nested in an index loop which has a value from 1 to 12. cfset sec = Second(Now()) cfset secs = 0 cfset TimeSpan = 60 cfloop condition=secs LT TimeSpan cfif sec IS NOT Second(Now()) cfset sec = Second(Now()) cfset secs = secs + 1 /cfif /cfloop You can do this, but it's not very efficient (since you're keeping that thread active and consuming resources for the whole of the sleep time rather than allowing it to go and get other work done). Instead you might consider setting up a task to do this - you can set the tasks programmatically so something like this like this can happen: Launch the process (either through a separate scheduled task or manually). Create (programmatically using CFSCHEDULE) a task that runs every minute which calls a mail sender page. The mail sender page: 1) Checks the working flag (described below) to see if it's free to run. If so it checks to see if there's any mail to send; if not it exits immediately. 2) If there's mail to send it sets a working flag to true someplace (in a database, in the application scope, etc) and sends 200 messages then sets the working flag to false. If there's no more mail to send it deletes the scheduled task. In the case of any errors I would log the problem and set the working flag to false. You can improve things of course but this prevents multiple threads from sending mail at the same time, implements your delay and only uses resources when running. Furthermore since each batch of 200 is running in a separate process one iteration can bomb for some reason and the others will still run meaning that most of your mail will get out regardless. I've used this kind of setup very successfully for delayed log-file batch processing. Jim Davis ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202523 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
Re: pausing a script
Thanks, that is elegan! cfscript Thread = createObject( java, java.lang.Thread ); Thread.sleep( javaCast( long, 1000*60 )); /cfscript -- Taco Fleur Senior Web Systems Engineer http://www.webassociates.com ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202524 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Pausing a script
Luis, This code will pause execution for 10 seconds: cfobject type=java name=obj class=java.lang.Thread action=create cfset obj.sleep(1) Paul Kenney [EMAIL PROTECTED] -Original Message- From: Luis Lebron [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 9:58 AM To: CF-Talk Subject: Pausing a script Does CF have an equivalent of the PHP sleep function. I need to pause s script for a few seconds. Luis ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: Pausing a script
That will work, but will also cause 100% cpu utilization for the duration of the pause, IIRC. -Original Message- From: Luis Lebron [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:38 PM To: CF-Talk Subject: RE: Pausing a script I found this code in Ben Forta's book. It seems to do the trick. cfset InitialTime= Now() cfloop Condition=DateDiff('s', InitialTime, Now()) LT 2/cfloop ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Pausing a script
Does CF have an equivalent of the PHP sleep function. I need to pause s script for a few seconds. Luis ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: Pausing a script
cfx_sleep in macromedia desdev area. ..tony Tony Weeg Senior Web Developer UnCertified Advanced ColdFusion Developer Information System Design Navtrak, Inc. Mobile workforce monitoring, mapping reporting www.navtrak.net 410.548.2337 -Original Message- From: Luis Lebron [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 12:58 PM To: CF-Talk Subject: Pausing a script Does CF have an equivalent of the PHP sleep function. I need to pause s script for a few seconds. Luis ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: Pausing a script
Are you speaking of a CFSCRIPT for pausing CFScript action or a PAUSE in between processign elements on a CF Page? There is a CF_Sleep or something similar in the Exchange [EMAIL PROTECTED] 12/06/02 12:58PM Does CF have an equivalent of the PHP sleep function. I need to pause s script for a few seconds. Luis ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: Pausing a script
There's no function, but you can do this easily by setting a time (or using GetTickCount()) and then doing a While this time is less than whatever, keep looping Should work fine. Jim Davis -Original Message- From: Luis Lebron [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 12:58 PM To: CF-Talk Subject: Pausing a script Does CF have an equivalent of the PHP sleep function. I need to pause s script for a few seconds. Luis ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: Pausing a script
I found this code in Ben Forta's book. It seems to do the trick. cfset InitialTime= Now() cfloop Condition=DateDiff('s', InitialTime, Now()) LT 2/cfloop -Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 12:25 PM To: CF-Talk Subject: RE: Pausing a script There's no function, but you can do this easily by setting a time (or using GetTickCount()) and then doing a While this time is less than whatever, keep looping Should work fine. Jim Davis -Original Message- From: Luis Lebron [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 12:58 PM To: CF-Talk Subject: Pausing a script Does CF have an equivalent of the PHP sleep function. I need to pause s script for a few seconds. Luis ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.