need to invoke a script upon arrival of a file

hi all,

i recieve a file from other server, on a daily basis .... but the time of arrival is unpredictable ....

i need to move this file to another directory before the next file arrives ...

i have written a script that does this op and performs some manipulations on the data...

but i do not know how to make the script run every day ... i cannot set a cron-job because of limited rights...

i want to invoke the script as soon as the file arrives ... is there a way to do it ?

I'd try either of the following:

  1. create a cron job as user (not as root) - or -
  2. create a script "running in circles" forever ...
while (true)
do
  # check folder
  # process file
  sleep # [time]
done

thanks a lot dr.house