Yard machine tractor 17.5 hp will not start after its hot no spark
I own a yard machine 17.5 hp tractor & it will start & run fine for awhile then all of a sudden it will die and have no spark let it sit for an hour or 2 then it will start and run fine also sometmes after its running if I shut it off it will not re-restart if I mow the lawn have to keep it running its getting annoying and can't trust it to stay running long enough to mow the lawn when it dies I checked for spark using a sprk checker and it has no spark I'm an auto tech so I have general knowledge of these things just not small engines any ideas what could cause this issue?