script scheduling

Hi,
I have a ksh scrip (x) that scans a directory and does actions when a file arrives in this directory.

My question is what is the best way to schedule x?

  1. Use cron tab and create a task running forever
  2. Creat another ksh script (y) that runs (x) in a non-terminating loop

Which option is better? Any other ideas?

Thanks much.

I think 2!
Use perl script:

#!/usr/bin/perl
unless ('ps ax|grep script.sh|awk \{\'print $1 }\''{
system ("sh /home/user/script.sh");
}

Thanks for your help.
Could you please explain your code a bit?

Thanks.