automated processes


I have written a script that looks at a target directory and performs actions based on what kind of file has been ftp'd to said directory. My thoughts are to schedule this in my crontab, quick and easy. But it would be nice if the script kicked off automatically every time a file was sent to the target directory. Is there any way to do this beside creating a daemon (which is a bit out of my range at this point)? I'm thinking probably not, but I might as well ask.


You might use the crontab again. You check for the files in the directory at certain times and if there is a file you perform your tasks on the file. Once done you remove the file and let the crontab scan it for new file at certain time. The script for that you will have to ask one of those experts unless you know how.

It seems using the crontab would be the obvious choice, I could schedule my script to run every fifteen minutes. The script itself takes care of performing tasks, removing old files, etc... Just wanted to see if there was something else I could employ. Thanks :slight_smile:

Well, if you think about it it is much easer to have something to be a sleep and get into action only when needed. It takes the minimum resources and so keeping your system well up. If you're familiar with scheduling then you got the idea.