How to check event scheduler status in MySQL?
Use SHOW VARIABLES SHOW VARIABLES WHERE VARIABLE_NAME = ‘event_scheduler’
Use SHOW VARIABLES SHOW VARIABLES WHERE VARIABLE_NAME = ‘event_scheduler’
I would always go a cron job, because: That’s where sysadmins will expect it to be (this point is not to be underestimated) crontab is bullet-proof, time-tested, extremely widely used and understood You can freely direct/analyse error/success messages where you want Some database tasks require/prefer mysql to be off-line (eg full backup), so you’ve got … Read more
This information is available through events in INFORMATION_SCHEMA. See LAST_EXECUTED column: SELECT * FROM INFORMATION_SCHEMA.events; You can also use SHOW CREATE EVENT yourevent to see what it does.
You can set event_scheduler=ON in my.ini or my.cnf file, then restart your server for the setting to take effect. Once set event_scheduler will always remain ON no matter whether your server restarts.
Events are run by the scheduler, which is not started by default. Using SHOW PROCESSLIST is possible to check whether it is started. If not, run the command SET GLOBAL event_scheduler = ON; to run it.