How can I run a script-based tool which will process files continuously downloaded to given directory as they arrive? I’d like to minimize delay (~1 second is OK), script can have own infinite loop.
I know a few ways, like:
- autologin user with
.bashrcor.profilecalling my script - fork script from cron, then ignore if it is already running
- use init scripts somehow (I guess it varies between distributions)
What method would work best?