For diesel, there is the thinking that if you keep the engine idling rather than turning it off and back on (letting it cool down) it will last much longer. I don't know how much truth there is in that but I do know it is a popular opinion.
Not that the above is historical. Modern batteries are much better. Direct injection engines start almost as fast as gas engines these days.
Still turn them off if you don't need it running. Most modern diesels 2004+ are way more efficient in this regard in consumer vehicles and modern diesel trucks are better than they used to be.