Rough Idle

2007 Dodge Ram 2500 5.9 Diesel

Rough idle when first started and will contiue until completly warm. ( about 30 min.) only at slow speed.

1999 hyundai sonata gls v6

My cars runs rough at idle while in gear. It runs smooth when I put it in neutral or park. What should I check?