Most graceful way to update file database for files not sent via browser or client?

I wrote short script to rescan external shares only and run it via cron like few times per day. You can combine both solutions.