bitsCN.com
Mysql事件查看及定时器相关操作
查看事件
SHOW EVENTS
select * from mysql.event
查看是否开启定时器
SHOW VARIABLES LIKE 'event_scheduler';
开启定时器 0:off 1:on
SET GLOBAL event_scheduler = 1; .
删除
drop EVENT *_event;
创建
CREATE EVENT IF NOT EXISTS *_event_test
ON SCHEDULE every 1 Hour
DO CALL update_*_proc();
或者
CREATE EVENT IF NOT EXISTS update_*_event
ON SCHEDULE every 1 DAY STARTS TIMESTAMP(CURRENT_DATE,'00:05:00')
ON COMPLETION PRESERVE ENABLE
DO CALL update_*_proc();
date_add(date(curdate() + 1),interval 8 hour)
bitsCN.com
相关标签:定时器
本文原创发布php中文网,转载请注明出处,感谢您的尊重!