Resistive-switching memory (RRAM) based on metal oxide is currently considered as a possible candidate for future non-volatile storage and storage-class memory (SCM). To explore possible applications of RRAM, the switching variability and cycling endurance are key issues that must be carefully understood. To this purpose we studied switching variability and endurance in pulsed regime for HfOx-based RRAM. We found that the resistance window, the set/reset variability and the endurance are all controlled by the maximum voltage Vstop which is applied during the negative reset operation. We demonstrate that endurance failure is triggered by a negative set event, where the resistance suddenly decreases during reset. Cycling endurance is studied as a function of time, compliance current and Vstop, allowing to develop an Arrhenius-law model which is capable of predicting device lifetime under various condition.