To be honest, I just pinched the logic from CA Autosys, the scheduling tool that the old warehouse uses. Linux::Inotify looks much more elegant, but we need to work across SAMBA and NFS, and as Andrew points out it may not work for us.<br>
<br><div class="gmail_quote">On 14 July 2010 13:04, Grant McLean wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Also, you were talking about your strategy for watching an incoming<br>
directory and checking when a file stabilises (no writes for &#39;n&#39;<br>
seconds).  I recently implemented a directory watching daemon using the<br>
Linux::Inotify module.  The cool thing about that module is it allows<br>
fine-grained control over the events you&#39;re interested in.<br>
<br>
So in my case I subscribed to &#39;IN_CLOSE&#39; and &#39;IN_MOVED_TO&#39; events which<br>
means I only get notified when a file is closed (ie: the client has<br>
finished writing) or renamed.  You&#39;d need to try it out to see how it<br>
interacts with SAMBA but it might be a useful solution.<br>
<br></blockquote></div>