The excitation of a quantum gas of independent fermions in a deforming cavity: periodicity of driving vs. Landau-Zener transitions