MySQL Forums
Forum List  »  Newbie

Re: MySQL CREATE EVENT Question
Posted by: Rick James
Date: September 09, 2014 04:36PM

> so as long as MySQL service is started then mysql events should work? right?

This qualification probably applies to all schedulers (cron, etc). If the machine (or crond or mysqld or, ...) is stopped at the scheduled time, then the even won't be run that day (or hour or whatever). You should have monitoring and procedures on top to notice that the daily task did not run.

An approach that I have successfully used is to run a daily task every hour, but have it so that it does nothing if the task has already been done. And have the task do just one day's worth of work. In an extreme case (say, the machine is down for 3 days), the hourly event will quickly (in 3 hours) catch up on the missed work. Completely hands off -- but I had to write the script with this failure case in mind.

Options: ReplyQuote


Subject
Written By
Posted
September 09, 2014 03:08AM
September 09, 2014 03:53AM
September 09, 2014 06:19AM
Re: MySQL CREATE EVENT Question
September 09, 2014 04:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.