I have this event that runs every Thursday
CREATE EVENT le_drop_database
ON SCHEDULE
EVERY 1 WEEK
STARTS CURRENT_DATE + INTERVAL 3 - WEEKDAY(CURRENT_DATE) DAY
DO BEGIN
drop database carbon;
END */$$
DELIMITER ;
I was wondering how i would add some parameter that indicates the time this event should run on Thursday for example run at 11:00 a.m
Best Answer
There are three things you should do with this
DROP DATABASE
toDROP DATABASE IF EXISTS
INTERVAL 11 HOUR
to theSTART
(as mentioned by @ypercube)ON COMPLETION PRESERVE
to make it a repeatable event so you don't have to create it again.Here are the changes
I hope this event is not in the
carbon
databaseIf you ever need to disable the event, just run
to reenable
CAVEAT
Please make sure you have this in
my.cnf
You can enable this without restarting mysql by running
Give it a Try !!!