cron? for every [red]10[/red] seconds???
ooops! the original post says '30 seconds' :~/
lightElf,
I guess the more efficient approach would depend on how many times the URI gets hit. The question is "how do you want to trigger the survey of the directory/file structure".
If it sees only a few (maybe up to several humdred) hits per day, then getting the CGI to do the refresh work is cheaper than firing a cron job every minute. There would probably be a major chunk of overnight time when there would be zero or nearly zero requests. Fold mod_perl into the equation and this gets reasonably fast and efficient.
Obviously, peak load situations would be important to watch.
Conversely, if the URI will get lots of hits, then the cron approach could be cheaper.
Also, if I went with the CGI approach, I would not write the index file to disk.....Just send the info back to the browser.
From the sys admin perspective, I tend to discourage most users from using crontabs. They tend to use them inappropriately and you end up with lots of cron 'noise', so to speak... things that would be done better another way or on a different cron schedule, or forgotten and running for weeks/months/years. I know a few sys admins that won't even let their general user population do crons.
I guess, as is usually the case, TMTOWTDI ;-) Hopefully, Mindy will find something that works well for her.
'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.