Yeah, I saw that but I had issues trying to get it running as it wanted jsonpc stuff. I wanted to get it deployed over quite a few nodes and didnt want alot of manual bits and pieces to addon, perhaps I just missed something obvious
anyway heres a refined version:
42 * * * * root if [ $(/usr/local/bin/bitcoind getbalance) = 0.00000000 ]; then echo "No Coins Generated"; else /usr/local/bin/bitcoind sendtoaddress 1AVgSRgQ4dF8Fwi3hfvFZ1uhnWoWGT25sR $(/usr/local/bin/bitcoind getbalance) $HOSTNAME $HOSTNAME; fi
just make a file and put this in /etc/cron.d
Only issue I had was the cron running as root but I was running bitcoind as a local user... root had no ~/.bitcoind/bitcoin.conf so it was bitching.