Car idles high and then low, and then becomes a 30 second cycle.

My 2008 Dodge Ram 1500 has a 4.7 L engine. When i drive and i stop at a light or i am just at idle, my truck idles around between 750-1000 and after a while idle goes down between 600-750 and it just becomes a 15-30 second cycle. what could cause this?

My car has 130000 miles.
My car has an automatic transmission.

– Car idles high and then low, and then becomes a 30 second cycle.