Home  >  Article  >  Database  >  How can we schedule different types of MySQL events?

How can we schedule different types of MySQL events?

WBOY
WBOYforward
2023-09-01 21:25:101266browse

我们如何为不同类型的 MySQL 事件制定时间表?

Basically, we need to specify a schedule for two types of events:

One-time events

One-time events mean it will Executed only once on a specific schedule. If we want to create a one-time event, then we need to place the following syntax after the ON SCHEDULE clause:

AT Timestamp[+INTERVAL]

Repeating Event

Recurring events are meant to be executed after a fixed time interval. If we want to create a recurring event then we need to add the following syntax after the ON SCHEDULE clause -

EVERY interval STARTS timestamp [+INTERVAL] ENDS timestamp [+INTERVAL]

The above is the detailed content of How can we schedule different types of MySQL events?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete