I have a directory where files are created to be run by a different user. ( Web process creates the file, need a user to run it )
I have a script that I have set on a cron job to run every 5 mins.
for i in /REMOTE/*; do
if [ -f $i ]; then
# if the file is there
mv $filename /REMOTE/Ran
IS there anyway to have a process running that will monitor the presence of files in the directory and run them when they appear ?
I want to feedback to the webpage that the script has been run but at the moment they get no indication until the cron job runs which can be upto 5 minutes away.
This means they have to refresh the browser screen 5 minutes later.
Any suggestions would be great.