maytag washer not drain and spin

Maytag top load washer, start a load and It will wash and agitate but when it gets to the drain and spin it does not drain and spin, the arrow on the timer keeps going until it gets to the off position. I then spin the timer all the way around back to the drain and spin and this time it works. This problem is intermittent about ever 2nd to 3rd load. is this a timer problem ?

Brad

Sometimes it’s the lid cam that actuates the switch it gets wore about a 5.00 part the part is located center of lid in the rear open and close lid and listen for a click and how far the lid is open before it does click. This would also be intermittant occurance