Will run perfectly for weeks then fails to start. Have tried new coil. There is always a spark. Even tried replacing the air ram. If left for about 30 mins it will start again normally. Any ideas?

I have just changed my tstat and now I have no spark at all. I had to remove the serpantine belt but I did not remove the timing belt. I have checked all the electrical connections and vacuum and I cannot find the reason why it wont start. It started fine before and idled perfect but now I get nothing at all. People have suggested that it has jumped timing but this is not possible since I never removed the timing belt. Please help I am absolutly out of ideas.