We need a little more info to properly diagnose the machine.
When the machine acts up, does the timer just "stop" where its at, or does it continue to the off position leaving you only with clothes that are sobbing wet?
When it doesn't spin, does all the water go out?
Sounds like the timer, but that is just an educated guess.