Actually, there are two command line switches -blocknotify and -walletnotify which will call a command when a block is found and when transactions arrive.
Ah, thanks for that!
Here's more info on it:
How to use Walletnotify? -
http://bitcointalk.org/index.php?topic=203438.0