Data on the perioperative management of patients cardiac implantable electronic devices (CIEDs) is limited and published guidelines rely mainly on the experience of the cardiologists and anesthesiologists who manage these patients. Depending on the device type and patient's dependency, these guidelines recommend the intraoperative magnet use, reprogramming of devices or no action. Magnet placement on a CIED (very simple and applicable method) has become the standard approach in many centers, while CIED reprograming by trained personnel is required in most centers. Therefore, our objective is to compare in a prospective randomized clinical trial the safety of intraoperative magnet use vs. CIEDS reprogramming vs. no intervention (in the appropriate subjects)