Events are classified according to their event type, as specified directly in the CREATE EVENT statement. The event types are of two kinds:
Active event types Some event types are the result of action by the database server itself. These active event types include the start and end of different database actions (BackupEnd and so on) or RAISERROR.
When the database server takes the action, it checks to see whether the trigger conditions defined in the WHERE clause are satisfied, and if so triggers any events defined for that event type.
Polled event types Some event types are not triggered solely by database actions. The free disk space types, as well as the IdleTime types, are of this kind.
For these types of events, the database server polls every thirty seconds, starting approximately thirty seconds after the database server is started.
For the IdleTime event type, the database server checks whether the server has been idle for the entire thirty seconds. If no requests have started and none are currently active, it adds the idle check interval time in seconds to the idle time total; otherwise, the idle time total is reset to 0. The value for IdleTime is therefore always a multiple of thirty seconds. When IdleTime is greater than the interval specified in the trigger condition, event handlers associated with IdleTime are fired.