Add configurable events triggered each X iterations

close #8
txs ! :cake: