sql - MySQL- How to implement event scheduler everyday + start from 8am to 10 pm+ every 15 min -
i insert statistic table 1 every 15 min start 8am 10pm everyday
how use mysql event scheduler it?
delimiter || create event stock_updater on schedule every 15 minute begin [insert code have made] end || delimiter ;
======================================
thz @saharsh shah, solve it, here final result:
create table abc (value int(10)); delimiter $$ create event abcevents on schedule every 15 second begin if (hour(sysdate()) between 14 , 15) insert abc value(123); end if; end $$ delimiter ;
try this:
delimiter $$ create event stock_updater on schedule every 15 minute starts '2013-11-27 12:00:00' on completion not preserve enable begin if (hour(sysdate()) between 8 , 22) begin insert abc values (123); end if; end$$ delimiter ;
Comments
Post a Comment