Control DC motor in a cycle

Any other methods to control dc motor so that it will just run one cycle exactly?
I tried using the delay method but it is not giving the exact output.

Thank you.

Limit switches, reed relays, Hall-effect devices, rotary encoders...