Re: Wait for File to Get Written

2012-05-30 Thread Judah McAuley
You could also use cfthread. Spawn the execution off into another thread, then use the cfthread join action to make current processing wait until the child thread is finished and rejoined. Put your logic to check for file existence in the child thread where the execution of the external app is. Th

Re: Wait for File to Get Written

2012-05-30 Thread Mary Jo Sminkey
> If you just add a timeout to your cfexecute, CF will wait and > continue > when the legacy program is ready. Cool, yeah that looks like a good addition to this particular process. Mary Jo ~| Order the Adobe Coldfusion Ant

Re: Wait for File to Get Written

2012-05-30 Thread Mary Jo Sminkey
>maybe use cfdirectory and look at 'dateLastModified' to wait for it to be >2~5 old (so you know it has finished writing to it) Well, not sure that has any benefit by itself versus just checking if the file exists. >I would make a retry loop, say 5 times with a sleep in between >and break out

Re: Wait for File to Get Written

2012-05-30 Thread Jochem van Dieten
On Wed, May 30, 2012 at 1:03 AM, Mary Jo Sminkey wrote: > Basically I have situations where I need to wait for ColdFusion to finish > creating a file before displaying it. The legacy code I'm working with using > a cfexecute to run an executable file, and it uses this code snippet: > > If you

Re: Wait for File to Get Written

2012-05-29 Thread AJ Mercer
maybe use cfdirectory and look at 'dateLastModified' to wait for it to be 2~5 old (so you know it has finished writing to it) I would make a retry loop, say 5 times with a sleep in between and break out if file found On 30 May 2012 07:03, Mary Jo Sminkey wrote: > > I've run into this a number

Wait for File to Get Written

2012-05-29 Thread Mary Jo Sminkey
I've run into this a number of times the last few months and couldn't find anything in the archives that really seemed to address it. It's a common enough issue that I'm sure people have dealt with it, and I'm curious what solutions you might use. Basically I have situations where I need to w