LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to Monitor a Directory (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-monitor-a-directory-380648/)

Daddyfix 11-06-2005 10:30 PM

How to Monitor a Directory
 
Does anyone know of a way to monitor a directory instead of using a cron job?

I have an external source sending me hockey pool statistics via ftp into a certain folder automatically every few days or so and I want to know if there is a way to trigger a PHP script to run when the user has disconnected.

Can anyone help?

Dtsazza 11-07-2005 07:02 AM

Is there any particular reason why you don't want to use cron jobs? As far as I can tell, it seems that any other solution would require a process to be constantly looking at the directory - which would undoubtedly use up more resources. Besides, such a process would probably check the directory, put itself to sleep for a bit, then check again, so it'd even be acting in a similar fashion.


All times are GMT -5. The time now is 09:20 PM.