I've used a queue concept that behaves similarly for an intranet project . Once per minute, a scheduled task runs and checks a database table, which is just a queue with job numbers, and jobentered, jobbegin and jobend fields. Each holds a date. The first holds the date that the job was entered. This happens when a user changes the status of a job.
When the scheduled task reads the database table and sees that there is an entered date but no start or end, it places a begin date in the appropriate field and starts the file move. Sometimes upwards of 10 Gigabytes is moved. When the scheduled task runs the next minute, it sees that there is already a job in progress, so it doesn't perform any actions. Once the move is done, the thread (page instance) that was doing the moving sets the jobend date field. Now the next job that was queued to be moved (if there was one) is handled by the next thread. This allows for unlimited jobs to be queued but allows only one to be processed at a time. If the client had a fiber-channel raid array the queue could be bumped up to 2 or 3 threads at a time, but that isn't the case. If it ran more than one thread at a time, the program would also have to make sure that two actions don't conflict, e.g.: changing the status of the same job by two different users would cause big problems if not handled correctly! Andy > -----Original Message----- > From: Vernaillen Tim [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 19, 2003 10:29 AM > To: CF-Talk > Subject: RE: Need to write Dispatcher! > > > Jeremy > > Thanks a lot already. > > I knew that i could use the scheduler of cfadministrator. But > what in the following scenario: > > i'm running the task, 50000 files are in the directory, the > following minute the process restart (another instance), a lot of > those 50000 will be still in the directory. how can i guarantee > that the files will be handled just onces? > > thanks for the ideas > > cheers > > Tim > > -----Original Message----- > From: Jeremy Brodie [mailto:[EMAIL PROTECTED] > Sent: dinsdag 19 augustus 2003 16:15 > To: CF-Talk > Subject: Need to write Dispatcher! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com