[LA.pm] Monitoring a directory using Event.pm
Peter Benjamin
pete at peterbenjamin.com
Wed Jun 8 18:19:48 PDT 2005
I'd tend to replace the existing FTP daemon with a perl based one,
and just have the new perl FTP daemon receive the file, write it
to disk, move it, and then spawn the software needed to process
the file contents.
That being so much work, I would stay with cron.
One other alternative is to have the sending system, after
FTP exits, to have the script there invoke ssh to run a
command on the remote system to process the file.
I've been told by gurus I respect that this is the
best possible method.
Along with a cron job on the receiving system to look for
files that were not processed, due to the ssh failing,
and it then doing "something", like emailing about this
failure, and perhaps processing the file, even though it
is late.
Alternatively, use a database replication method instead of
FTP, and use the database triggers. A lot of work though.
More information about the Losangeles-pm
mailing list