Quantized refrigerator for an atomic cloud