A/C works perfect then starts blowing hot air. This cycle happens quite often! on 1997 Jeep Grand Cherokee

When the A/C blows hot air I can turn the temp selector all the way to hot and then back to cold and it starts blowing cold air again. This problem stays fixed for about 30 minutes while driving then it happens again..... Any ideas????

Asked by for the 1997 Jeep Grand Cherokee