Dryer shuts off intermittently

My Maytag dryer is having a problem.

My wife loads it and it won’t start. If she pulls on the timer dial just right, it will start. It then runs for some time and then stops. Sometimes it will run for 5 minutes, sometimes less, sometimes the whole time.

When is shuts off prematurely, the buzzer will buzz but the timer will continue run.

Other than shutting off when it is not supposed to, the dryer is running fine.

Any thoughts?