45. Scheduled Events
Scheduled Events have been introduced with MySQL
TM v.5.1.6.
An Event is a named database object containing one or more SQL statements to be executed at one or more regular intervals, beginning and ending at a specific date and time. Scheduled tasks of this type are also sometimes known as ''temporal triggers'', implying that these are objects that are triggered by the passage of time.
An event can be enabled or disabled; if disabled the event is still present in the database but it is not executed.
See Also:
- 41: Tables
- 42: Views
- 43: Stored Procedures
- 44: Stored Functions
Creating an Event
To create an Event:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database you want to create the event in;
- right click on the ''Scheduled Events'' node and select the ''Create Event'' item from the popup menu;
- use the ''Scheduled Event Editor'' (sec. 45.1).
Editing an Event
To edit an Event:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the event you want to edit;
- expand the ''Scheduled Events'' node;
- double click or right click on the event and select the ''Edit Event'' item from the popup menu;
- use the ''Scheduled Event Editor'' (sec. 45.1).
Dropping an Event
To drop an Event:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the event you want to drop;
- expand the ''Scheduled Events'' node;
- right click on the event and select the ''Drop Event'' item from the popup menu;
- confirm the requested operation.
Multi-Drop of Scheduled Events
To drop a set of Events:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the events you want to drop;
- right click on the node ''Scheduled Events'' and select the ''Multi-Drop of Events'' item from the popup menu;
- use the ''Multi-Drop Wizard'' (chap. 26).
Enabling/Disabling an Event
To enable / disable an Event:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the event you want to enable/disable;
- expand the ''Scheduled Events'' node;
- double click or right click on the event and select the ''Edit Event'' item from the popup menu;
- click on the ''Enable/Disable Now!'' button of the ''Scheduled Event Editor'' (sec. 45.1).
Copyright © 2007 - 2009 HoneySoftware - All Rights Reserved
Submit feedback on this topic.