A detailed analysis of how environment affects the star formation history of early-type galaxies (ETGs) is undertaken via high signal to noise ratio stacked spectra obtained from a sample of 20,977 ETGs (morphologically selected) from the SDSS-based SPIDER survey. Two major parameters are considered for the study: the central velocity dispersion (sigma), which relates to local drivers of star formation, and the mass of the host halo, which relates to environment-related effects. In addition, we separate the sample between centrals (the most massive galaxy in a halo) and satellites. We derive trends of age, metallicity, and [alpha/Fe] enhancement, with sigma. We confirm that the major driver of stellar population properties in ETGs is velocity dispersion, with a second-order effect associated to the central/satellite nature of the galaxy. No environmental dependence is detected for satellite ETGs, except at low sigma - where satellites in groups or in the outskirts of clusters tend to be younger than those in the central regions of clusters. In contrast, the trends for centrals show a significant dependence on halo mass. Central ETGs in groups (i.e. with a halo mass >10^12.5 M_Sun) have younger ages, lower [alpha/Fe], and higher internal reddening, than isolated systems (i.e. centrals residing in low-mass, <10^12.5 M_Sun, halos). Our findings imply that central ETGs in groups formed their stellar component over longer time scales than isolated centrals, mainly because of gas-rich interactions with their companion galaxies.