bitcoin/bitcoin — pull request #743 by gavinandresen (2012-01-03 20:53:52+00:00)
Title: -blocknotify : run a command when best-block changes

This re-implements pull#714, using system() (which does work on Windows) and boost::thread().

Help text is:
-blocknotify= Execute command when the best block changes (%s in cmd is replaced by block hash)

Example usage (this is how I tested):

./bitcoind -blocknotify="./bitcoind getblock %s >> /tmp/blocks.txt"