Check for a blocked vent; if hot air cannot escape, the dryer will be turned off to prevent a fire. If the dryer engine overheats, the thermal overload switch will trip to avoid a fire. While it may restart once it cools down, the motor needs to be replaced. The vibration of the dryer when it is on will push the door open and shut the dryer off if the door latch is not secure enough. The switch should be replaced. Failure of the moisture sensor—this sensor normally turns the dryer off once the clothes are dry, but if the part fails, the dryer will turn off too soon. Replace the sensor if necessary.