The following editor will bring you a brief discussion of MySQL event planning tasks. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor and take a look.
1. Check whether the event is turned on
##show variables like '%sche%'; set global event_scheduler =1;
2.
--Set the time zone and set the planned event scheduler to turn on, or event_scheduler = ONset time_zone = '+8:00';
set GLOBAL event_scheduler = 1;
use test;
drop event if exist test_update;
DELIMITER $$
-- on schedule every day starts timestamp '2012-11-15 10:00:00'
on schedule every day starts timestamp '2012-11-15 10:00:00'
do
begin
-- do something write What your planned task will do
-----------------------------------
end $$
DELIMITER ;
The above is the detailed content of A brief introduction to event planning tasks in MySQL. For more information, please follow other related articles on the PHP Chinese website!