2

Example I have an event that will run every 5 seconds, then the first instance of the event is triggered but more than 5 seconds later the instances still not done executing. What will happen to the event would it execute again after 5 seconds even the first event is not finished yet or it will wait for the first instance of the event to finish before executing?

Thanks

zer09
  • 463
  • 1
  • 4
  • 12

1 Answers1

4

To quote the manual:

If a repeating event does not terminate within its scheduling interval, the result may be multiple instances of the event executing simultaneously. If this is undesirable, you should institute a mechanism to prevent simultaneous instances. For example, you could use the GET_LOCK() function, or row or table locking.

In other words, the new copy will run.

This could lead to more and more running, so you should worry about it.

zer09
  • 463
  • 1
  • 4
  • 12
Rick James
  • 80,479
  • 5
  • 52
  • 119