On 11/22/10 8:55 PM, Andrey Repin wrote:
Greetings, Les Mikesell!

Realistically, you probably don't need to kick off the job the instant
the filesystem changes - you'll at least want to wait until the file
transfer completes.  I'd expect a scheduled job running from cron on
linux or the windows task scheduler checking for new files every few
minutes to work at least as well as your existing manual process and
avoid any OS/filesystem dependencies (i.e. it could run from linux
checking a smb/cifs mounted windows filesystem or the reverse if you want).

Cron job won't be able to know if file transfer is completed. It will have to
guess from, e.g., testing the archive (if it's archive) for integrity.
filesystem notification mechanism will for sure know, when the iostream got
filewriteclose event.

You can wait until the file timestamp stops changing for a while - but neither that nor a filesystem notification will tell you if the transfer actually completed or if it failed midway. However, many transfers use a temporary name, renaming only when successful and complete so just looking for an expected name may be enough.

--
  Les Mikesell
   lesmikes...@gmail.com


Reply via email to