I have one mysql event which will execute every 1 day and do some activity. Please find code snippets for the same.
delimiter |
CREATE EVENT createTest
ON SCHEDULE EVERY 1 DAY
DO
BEGIN
-- Do some work
END |
delimiter ;
when i created this event it executes same time for the same day. For next day it executes (last execution + 24 Hour) scenario.
is it possible to set start time in events? I want to executes this events on every day 0 hour?
Yes, you can do it. Use STARTS option for this purpose.
Note, that event start datetime must be in a future.
For @spt –
Also, if it is hard to create and setup event object, you can use GUI event object editor in dbForge Studio for MySQL (free Express edition allows it).