|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I'd like to have a program (daemon, service)poll a folder and do some action on it's content.
How can I do this in java, php, python ... anything? Thanks in advance for your help!
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#2
|
|||
|
|||
|
The easiest way is probably to write script which does this, then run it on regular intervals using cron (if on unix). I don't know what you have to use on windows, but I'm sure a similiar tool is available.
__________________
-- Regards André Nęss Puritanism: The haunting fear that someone, somewhere may be having fun |
|
#3
|
||||
|
||||
|
Well, there is plenty of such programs, but they are all commercial.
I need a service/daemon because it has to poll the directory "continuously", and I don't think that a cron that runs every 5 sec. would be right. Do you know of any opensource project of this kind? Or a tutorial about building a service/daemon? Regards. |
|
#4
|
|||
|
|||
|
Quote:
So basically you want to "hook up" the OS functions manipulating with directory files (creating/modifying),etc. ? |
|
#5
|
|||
|
|||
|
Well, I guess that's just a program which does something every 5 seconds and sleeps for the rest of the time... You could even use a simple PHP script for that, although it's probably better to write it in C to avoid wasting resources:
PHP Code:
|
|
#6
|
||||
|
||||
|
Thanks for your help, I've even found another example in vb, but I'm gonna try with Python.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Software Design > Directory polling? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|