Engine will start when it is cold and hot if only driven for short periods of time. When I drive for more than 30 minutes then stop the engine it won't start unless I wait ~30 mins and try to start it again. When I try to start it shortly after stopping from driving for awhile it will crank but just won't start, check engine light comes on.
I took it to a parts store and they checked the battery and said it was testing fine along with the starter and alternator. They did say based on what I told them, they suspected it was any one of the three (battery, starter, or alternator) starting to go bad. Based on none of them being actual mechanics and me not having a clue how to narrow down which of those three are the problem, if they really are even the problem, I'd ask an expert.
I really doubt that any of the three things they suggested are bad. If the engine is turning and not starting, you need to check to see if it is getting spark and fuel to the engine. From that point, you can focus on a specific circuit. If the alt, starter or battery was bad, it would allow the battery to go dead and it wouldn't start anytime.