mohtasham1983 |
11-18-2008 04:14 PM |
Running a script upon a file is added to a directory
Hi,
I have a CUPS based printer that holds all print job it receives. However, there are certain print jobs that I want to print immediately. The print job file name is the only way of distinguishing such files from others, so it's impossible to configure CUPS to handle such action as far as I know.
I know that all print jobs go to a certain directory on the server, once they're received. That is, I want to know if there's any way a script that takes care of releasing print job, can be ran once a new file is created in a directory.
I tried to use cron job for this purpose, but I cannot set the cron job time period to less than a minute. I need something that can be invoked immediately.
Any idea?
|