We present a detailed stellar population analysis of 27 massive elliptical galaxies within 4 very rich clusters at redshift z~0.2: A115, A655, A963 and A2111. Using the new, high-resolution stellar populations models developed in our group, we obtained accurate estimates of the mean luminosity-weighted ages and relative abundances of CN, Mg and Fe. We have found that [CN/H] and [Mg/H] are correlated with sigma while [Fe/H] and Log(age) are not. In addition, both abundance ratios [CN/Fe] and [Mg/Fe] increase with sigma. Furthermore, the [CN/H]-sigma and [CN/Fe]-sigma slopes are steeper for galaxies in very rich clusters than those in the less dense Virgo and Coma clusters. On the other hand, [Mg/H]-sigma and [Mg/Fe]-sigma slopes keep constant as functions of the environment. Our results are compatible with a scenario in which the stellar populations of massive elliptical galaxies, independently of their environment and mass, had formation timescales shorter than ~1 Gyr. This result implies that massive elliptical galaxies have evolved passively since, at least, as long ago as z~2. For a given galaxy mass the duration of star formation is shorter in those galaxies belonging to more dense environments; whereas the mass-metallicity relation appears to be also a function of the cluster properties: the denser the environment is, the steeper are the correlations. Finally, we show that the abundance ratios [CN/Fe] and [Mg/Fe] are the key chemical clocks to infer the star formation history timescales in ellipticals. In particular, [Mg/Fe] provides an upper limit for those formation timescales, while [CN/Fe] apperars to be the most suitable parameter to resolve them in elliptical galaxies with sigma<300 km/s.