This article outlines how I use a pre-commit hook and cog to keep my blog stats updated automatically.
If there is a 50% chance something will go wrong, then 9 times out of 10 it will.