If you have a corroded cable connection, it will have a high resistance which will limit the current to the starter motor. The next time it does this check ground cable connection to see if it is warm or hot. If it is, take the connection apart, clean all the metal and re-assemble very tight.