4.7 Eratic Idling

My wifes 2000 Grand Cherokee with a 4.7 has been almost problem free.Just has 1 annoying glitch,eratic idle in gear or park,it revs up & down from 600 rpm to 1300 rpm with out touching the gas pedal.I have sprayed the throttle body before doing an oil change and it'll be fine for awhile and then it returns to the same problem.Just sprayed the throttle body with cleaner today and replaced the pcv valve to see if that helps before i changed the oil.It goes in this week for a emissions test and i want to make sure it's good to pass.Spark plugs have about 7000kms on them.
Any thoughts what is causing this?
Author: 77dragracer