v3.1 configuration example
MariaDB event scheduler
Review and adapt this example to your topology, product version and security requirements.
SET GLOBAL event_scheduler = ON;
CREATE EVENT archive_mail_weekly
ON SCHEDULE EVERY 1 WEEK
DO INSERT INTO mail_archive SELECT * FROM mail_log WHERE created_at < NOW() - INTERVAL 35 DAY;Important: replace example addresses, credentials, hostnames and paths. Validate syntax before deployment.