Convection in a long box driven by heating and cooling on the horizontal boundaries