We study the time evolution of a periodically driven quantum-mechanical system coupled to several reservoirs of free fermions at different temperatures. This is a paradigm of a cyclic thermodynamic process. We introduce the notion of a Floquet Liouvillean as the generator of the dynamics of the coupled system on an extended Hilbert space. We show that the time-periodic state which the state of the coupled system converges to after very many periods corresponds to a zero-energy resonance of the Floquet Liouvillean. We then show that the entropy production per cycle is (strictly) positive, a property that implies Carnot's formulation of the second law of thermodynamic