We present a general formulation of the resetting problem which is valid for any distribution of resetting intervals and arbitrary underlying processes. We show that in such a general case, a stationary distribution may exist even if the reset-free process is not stationary, as well as a significant decreasing in the mean first-passage time. We apply the general formalism to anomalous diffusion processes which allow simple and explicit expressions for Poissonian resetting events.