| Setting Advanced Event Properties
Edit the ON SCHEDULE clause under Schedule tab. The ON SCHEDULE
clause determines when, how often, and for how long the SQL statment defined
for the event repeats. This clause takes one of two forms:
AT
AT timestamp is used for a one-time event. It specifies that
the event executes one time only at the date and time, given as the timestamp,
which must include both the date and time, or must be an expression that resolves
to a datetime value.
Use +INTERVAL to create an event which occurs at some point in the
future relative to the current date and time.
EVERY
For actions which are to be repeated at a regular interval, you can use an
EVERY clause which followed by an interval. (+INTERVAL
is not used with EVERY.)
STARTS
An EVERY clause may also contain an optional STARTS clause.
STARTS is followed by a timestamp value which indicates when
the action should begin repeating, and may also use +INTERVAL interval
in order to specify an amount of time "from now".
For example: EVERY 3 MONTH STARTS CURRENT_TIMESTAMP + 1 WEEK
means "every three months, beginning one week from now".
ENDS
An EVERY clause may also contain an optional ENDS clause.
The ENDS keyword is followed by a timestamp value which tells
MySQL when the event should stop repeating. You may also use +INTERVAL
interval with ENDS.
For Instance: EVERY 12 HOUR STARTS CURRENT_TIMESTAMP + INTERVAL
30 MINUTE ENDS CURRENT_TIMESTAMP + INTERVAL 4 WEEK is equivalent
to "every twelve hours, beginning thirty minutes from now, and ending
four weeks from now".
| P.S. |
The timestamp must be in the future - you cannot
schedule an event to take place in the past. |
| |
The interval portion consists of two parts, a quantity and a
*unit of time.
*YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |
WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |
DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND
|

|