If you set your dryer to run for a certain period of time, but the dryer never stops, the dryer's airflow might be blocked. When the venting system becomes obstructed with lint or debris, it restricts airflow in the dryer. Consequently, the dryer is unable to reach a certain temperature in the drum. As a result, the dryer continues trying to reach a certain temperature that's needed to dry clothes. Until that temperature is reached, the dryer doesn't officially start the timer for a drying cycle, which is why it persistently runs. Inspect the dryer's exhaust system for clogs and remove them.
Defective Special Thermostat
Certain dryers have an automatic dry setting. When set for this option, the dryer continues to run until the laundry is dry. The dryer relies on a special thermostat to gage the temperature inside the drum. For example, once the drum reaches about 135 degrees Fahrenheit, the thermostat sets a time for the dryer to operate. The thermostat then monitors the interior temperature of the drum to sense when to shut off. However, when the thermostat malfunctions, it's unable to monitor the temperature in the dryer, so the dryer continues to run assuming the temperature inside hasn't been reached.
Broken Heating Element
A dryer's heating element is responsible for heating air before it's ushered into the drum to dry laundry. When this component or one of its parts wears, it's unable to effectively produce enough heat to dry clothes. Since the dryer works with the aid of a thermostat that regulates heat in the drum and starts the cycle's timer once the temperature reaches a certain level, when the heating element doesn't produce enough heat, the dryer just runs endlessly. Consult a dryer repair specialist to test the effectiveness of the dryer's heating element, and replace it if necessary.
Worn Timer Motor
The timer motor is what enables the dryer to spin and produce heat for a specific cycle set time. It's activated once a dryer reaches a certain internal temperature. It continues to operate the dryer until the cycle ends, and then the motor timer alerts the dryer to stop. If this component fails, the dryer won't know when to start and stop a cycle and runs endlessly until you manually stop the dryer from the control panel or by opening its door.