If you use CFSchedule to reschedule tasks that close together, you'll have
make sure that the Scheduler Refresh Interval is set to 1 minute.  Even
then, I don't know that I'd trust it.  Once a scheduled event passes without
executing, you're stuck.

A simpler approach would be to just schedule it to run every two minutes
from the desired start time until midnight.  When the template finds that
there are no more records, _then_ have it delete itself.  You don't have to
deal with rescheduling, or making sure the CF scheduler sees the updated
task.

Jim


----- Original Message -----
From: "Duane Boudreau" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, February 10, 2002 10:49 PM
Subject: RE: Scheduled Events


> 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
>
> 
______________________________________________________________________
Dedicated Windows 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=coldfusiona
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

Reply via email to