how do i make motors run for a set amount of time

it s not much help I want to run the motors for 25 minutes then turn them off and keep them off and also break out of the loop