At first I assumed it was caused by a malfunctioning thermal cut out switch , humidity sensor, or maybe a blocked vent. Have seen that before. But all the thermal switches and thermostats had proper resistance and so did the heating element. I found a video that showed how to check the dryer timer switch by measuring the connectors on the switch that complete the dryers electrical circuits. There is a circuit diagram in the dryer under the switch that shows how the various connectors are open or closed depending on the dryer mode. That was the issue. You could wiggle the dryer timer knob and open the heater circuit connectors as you moved it. I opened the switch up and the internal spring loaded contact points had evidence of arcing which burned them. I decided to just get a new switch - the bearings in the old one were loose and the cams starting to wear out - would have just failed again was my guess. 16 years old. Changing the switch is very easy once you know that is the issue - less than 30 minutes. Diagnosing of course can take some time getting panels off and getting oriented if you are not an appliance service tech doing this all day every day. Watch the online videos - it will save you time for sure.