Added setOnCompleteOnRepeat method to specify an onComplete to fire at the end of every loop