Add configurable events triggered each X iterations

close #8