I could have 20,000 records to process or zero. I think I am going to do is try to have the task re-schedule itself if there are records left over, or delete itself if there are none.
Duane -----Original Message----- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 12:32 AM To: CF-Talk Subject: Re: Scheduled Events You could schedule the template to run every two minutes, beginning at a certain time and ending at a certain time. Unless you have a highly variable number of records, divide by 500 to figure out approximately how many times it needs to run. If you have 10,000 records, it needs to run 20 times. Since you're marking them off, you could play it safe and schedule the template to run 25 or 30 times with little overhead. When the template runs and there are no records to process, just do a <cfabort>. If the template takes more than two minutes to run, then you'd have to be careful not to allow the schedule events to overlap and potentially double-process some records. In that case, schedule it to run every 3 or 4 minutes or whatever. If the template only takes a few seconds, then scheduling it every 2 minutes is nearly equivalent to having the process 'sleep' for 2 minutes. Jim ----- Original Message ----- From: "Duane Boudreau" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, February 10, 2002 9:29 PM Subject: Scheduled Events > I need to accomplish the following but am not sure how: > > I have a template scheduled to run that processes records in a db in blocks > of 500. (Each record is marked as it is processed) > > After the template has processed its 500 records I would like the template > to "sleep" for two minutes and then reload itself. I don't want to use a > counter since that will eat up processor and memory. > > Any suggestions for the reload and wait? > > Thx, > Duane ______________________________________________________________________ Why Share? Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

