Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Deferred Callbacks

Security covered Drupal 10–11
View on drupal.org

This module lets you schedule PHP functions to run after a web page has finished loading, without delaying the user. It's useful for tasks like sending emails or updating analytics that don't need to happen immediately. The module aims to improve user experience by not slowing down page delivery.

Deferred Callbacks provides a simple and reliable way to defer execution of PHP callbacks until after the HTTP response has been sent to the client.

The module allows developers to register callbacks during request handling and have them executed on the kernel.terminate event, ensuring that non-critical operations do not block page delivery or degrade user experience.

It is ideal for lightweight, post-response tasks such as sending emails, logging, analytics tracking, cache warming, and other side effects that should not delay the response.

Deferred Callbacks integrates cleanly with Drupal’s service container, supports callback prioritization and naming for debugging, and safely isolates failures by catching and logging exceptions.

⚠️ Important: True asynchronous execution requires PHP-FPM or LiteSpeed. On Apache with mod_php, callbacks will execute synchronously before the response is sent.

This module is not a replacement for the Queue API and should not be used for long-running or resource-intensive jobs.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Dec 19, 2025