1. Trim your layer if you need to by changing the In and Out points.
See 'Trimming layer footage' in the Adobe After Effects Help for more
information.
2. Apply Time Remap to the layer. Layer > Enable Time Remapping.
3. Tap the I key (that's I as in India). That will bring you to the in
point of your clip. Set a keyframe for Time Remap by clicking the
stopwatch.
4. Tap the O key (that's the letter O, as in orange). That brings you
to the outpoint of your clip. Add a keyframe here.
5. There may be other keyframes in set for Time Remap. You can delete
them.
6. Add an expression to Time Remap. Select Time Remap in the timeline
and go to Animation > Add Expression.
7. Use the pull down menu for expressions by clicking the box with the
right arrow. Select Property > loopOutDuration(type = "cycle",
duration = 0) or just type: