Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

event_scheduler

39 sites Security covered
View on drupal.org

This module allows specific (code) events to be delayed until the end of page execution, or even until a scheduled time in the future.

This module has nothing to do with calendar or real-world events. It's a code thing only.

THIS CODE DOES NOTHING ON ITS OWN. IT SHOULD NOT BE ADDED UNLESS ANOTHER MODULE NEEDS IT.

The Problem with Events

System events are executed at the time they are issued. This means that non-critical actions might be executed during the page build and therefore delay it.

For example, (using exaggerated times just for illustration), the action of a form might be to save an entity but also send ten emails to interested users.

Let's say it takes 0.05 seconds to save the entity, and it takes 0.10 seconds to send a single email. The site should be building the next page after 0.05 seconds, but it has to send 10 emails, so it adds a whole second to the time.

But the event is working exactly the same as an old Drupal hook, it has to be acted on right at that moment.

Delayed events

How about if you could delay all that non-critical processing until after the main page processing is complete?

You can.

All you have to do is queue non-critical events until the Symfony Kernel sends its Terminate event (meaning the page has been sent), then execute all those non-critical queued events.

In this example it means the page is delivered after 0.05 seconds, while the time-consuming emails are sent afterwards.

This module provides that choice when dispatching events, and another (even better) one:

  • Delayed events: Execute after the page has been sent to the user, which means it will not add time to the user experience of the page.
  • Scheduled events: Allow an event to be held until some time in the future then it is launched and can be executed.

How it works

If you want an event to be delayed or scheduled you add either one of two interfaces to the custom event class, and then you use a custom event dispatcher. The custom dispatcher treats ordinary events just the way the usual dispatcher does, it adds delayed events to a queue which it executes after the rest of the page, and sends scheduled events to the database where they wait until it's time for them to be launched.

A full explanation is given in the module's README.md file.

Additional modules

Activity

Total releases
3
First release
Aug 2025
Latest release
1 month ago
Release cadence
89 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
2.3.0-rc6 Pre-release Feb 21, 2026
2.3.0-rc5 Pre-release Feb 14, 2026
2.3.0-rc4 Pre-release Aug 27, 2025