How to achieve a repeat function that can be stopped

Yes it does.