Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have an event planned to run a 00:00. But the server won't be online at that point, seeing it's a local development server. Will it run the next time the server is online, or will it just be forgotten?

The event is as follows:

    CREATE DEFINER=`root`@`localhost` 
    EVENT `winners` 
    ON SCHEDULE EVERY 1 DAY STARTS '2013-02-19 00:00:00' 
    ON COMPLETION PRESERVE ENABLE
    DO 
    UPDATE `data`
    SET wins = wins + 1
    ORDER BY cur_score DESC 
    LIMIT 1
share|improve this question
    
Are you asking whether the "missed" event will be "made up" when the server restarts, if the server isn't online when the event should have fired? –  Michael - sqlbot Feb 19 '13 at 22:56
add comment

1 Answer 1

up vote 0 down vote accepted

It should run just fine.

However, it is just like configuring Windows Updates. If you configure Windows Updates for 12:00 AM, shutting down the Windows Machine at 11:59 PM and starting it back at 12:01 AM prevents Windows from checking for Updates.

When such a shutdown is occasional, leaving everything alone will cause the DB server to bring up the MySQL Event at midnight so long as mysqld is running at midnight.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.