2
I created an event in a database Mysql, I noticed when I restarted the bank localhost
, the event returns offline
, someone knows if it is like that or if you have to execute a command whenever the database is started or if you are in a hosting the bank already executes the command after the bank is restarted in case of a fall or maintenance account?
Code used to start the event:
SET GLOBAL event_scheduler = ON;
Event code:
CREATE EVENT `limpeza`
ON SCHEDULE
EVERY 1 MINUTE STARTS CURRENT_TIMESTAMP()
ON COMPLETION PRESERVE
ENABLE
DO
insert into pessoa (nome) SELECT CONCAT_WS(":",CURRENT_DATE(),EXTRACT(HOUR FROM CURRENT_TIME()))