CREATE DEFINER=`user`@`localhost` EVENT `event_name`
ON SCHEDULE
EVERY 5 SECOND STARTS '2016-10-01' ENDS '2020-10-01'
ON COMPLETION PRESERVE
ENABLE
COMMENT '备注信息'
DO begin
#SQL;
end
查看定时任务是否开启:
定时任务不执行,就需要开启任务: