We study the fluctuations of work caused by applying cyclic perturbations and obtain an exact sum rule satisfied by the moments of work for a broad class of quantum stationary ensembles. In the case of the canonical ensemble, the sum rule reproduces the Jarzynski equality. The sum rule can also be simplified into a linear relationship between the work average and the second moment of work, which we numerically confirm via an exact diagonalization of a spin model system.