檢視event是否開啟
- show variables like '%sche%';
- set global event_scheduler = 1 ;
- CREATE PROCEDURE timing_test()
- BEGIN
- update cdr SET date_time = now () WHERE id = 1 ;
- END;
- create event if not exists e_test
- on schedule every 10 second
- on completion preserve
- do call timing_test ();
關閉事件任務
- alter event e_test ON
- COMPLETION PRESERVE DISABLE;
- alter event e_test ON
- COMPLETION PRESERVE ENABLE;
評論(1)