Работа с эвентами в MySQL и MariaDB

SET GLOBAL `event_scheduler` = ON;
CREATE EVENT `hourly_event`
ON SCHEDULE EVERY 1 HOUR
DO
DELETE FROM `table_name`;