CREATE EVENT update_status
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE
ON COMPLETION PRESERVE
DO BEGIN
UPDATE OnDuty SET Status = '10-7' WHERE minute(timediff(Date,CURRENT_TIMESTAMP)) < 30;
END;
Can't seem to get this to work, in PHPMyAdmin it gives me this error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 7
I'm lost.. I'm not used to do Schedules in MariaDB.