[LA.pm] Monitoring a directory using Event.pm
Ranga Nathan
RNathan at baxglobal.com
Wed Jun 8 12:53:45 PDT 2005
__________________________________________
Ranga Nathan / CSG
Systems Programmer - Specialist; Technical Services;
BAX Global Inc. Irvine-California
Tel: 714-442-7591 Fax: 714-442-2840
Clay Irving <clay at panix.com>
Sent by: losangeles-pm-bounces at pm.org
06/08/2005 12:38 PM
To
losangeles-pm at mail.pm.org
cc
Subject
Re: [LA.pm] Monitoring a directory using Event.pm
Ranga Nathan wrote:
>I have a need to run a script when a file is received into a directory
via
>FTP. This is Linux SuSE9 environment.
>I am looking at Event.pm documentation. Can some one show me examples of
>how to monitor a directory for new files?
>If there are other elegant methods I would like to know.
>
>As a last resort, I can hand-roll one. But why re-invent the wheel?
>
>
I don't think I understand what you are trying to do -- Are you trying
to do something that "find" or "if (-e $filename)" can't do for you?
The host is receiving files continuously via FTP. As soon as the file is
receive it needs to be processed by a script and the file moved to a
'processed' directory. Currently we have a script that runs under xinetd.
It loops, sleeping for 30 seconds after processing the files. I want to
make it event based. That is the script should run only WHEN the file
appears as a result of FTP, essentially turning a batch type process into
event-based processing.
_______________________________________________
Losangeles-pm mailing list
Losangeles-pm at pm.org
http://mail.pm.org/mailman/listinfo/losangeles-pm
More information about the Losangeles-pm
mailing list