Plugins You can find out about all the publicly available Grails plugins.

Delayed Events Plugin

  • Tags: events, utility
  • Latest: 0.1
  • Last Updated: 13 November 2014
  • Grails version: 2.2 > *
  • Authors: Sébastien Le Callonnec
  • License: MIT License
0 vote
compile "org.grails.plugins:delayed-events:0.1"

 Documentation  Source  Issues


Support for delayed events


compile ':delayed-events:0.1'

This plugin uses the spring-events (from which it borrows its wiring logic) and quartz plugins.



The delayed events plugin adds a publishDelayedEvent method to domain classes, controllers and services in a fashion similar to what spring-events does. When triggering a delayed event, just call the following method:

publishDelayedEvent(this, theEvent, 150000)

The first parameter is the source of the event, the second the Spring event to trigger after some time, and the last one is the delay after which you want the event to fire (in millisecond).


The delayed events plugin uses a scheduled job that runs every second to process the event queue; once the queue is cleared, it will only run one second later. This means that events coming right after the queue has been cleared will be processed one second after if their delay has expired. In other words, there is no guarantee as to when exactly a delayed event will execute.