inotifywait


Use inotify to get your script run when a file was created in a directory:

inotifywait -qr -m my_directory -e close_write --format '%w/%f' | while read x ; do my_job "$x" & done


This line will fork my_job immediately after a file in my_directory has been written and closed.

Inotify-tools