Shuts off prematurely

the dryer will come on and run for about 20-30 seconds and then shut off.

Hi jerryjanice29

Does it shut off completely or there is just a heating part of the dryer shuts off? Please, post as much information, as possible.
Also to provide the most accurate advise I need the complete model number of your dryer. You can find it on the door frame.

Gene.

Repaired. thanks for the help. Found bare section of wire on door switch wire.