We had an issue where cron would reach max_execution_time and simply stop. The issue was that we did not know which module's cron tasks were taking so much time, thus added more logging for cron runs to identify slow modules.

We realize that this might be solved using modules like Ultimate Cron (or maybe some other?), however, it seems overkill to have to install a new module for these small changes. For example, you are using standard cron and you encounter the same issue. And, let's say that the longest task is search indexing. You can simply change the setting to have less pages indexed once you know why it reaches max_execution_time.

Other idea would be to add more hooks to cron runs, so the users could develop more flexible solutions without altering Drupal core.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marbard created an issue. See original summary.

marbard’s picture

Here's a patch for more detailed descriptions.

cilefen’s picture

Please check if this is an issue with Drupal 8. If so, it must be fixed there first according to the backport policy.

DamienMcKenna’s picture

Status: Active » Closed (duplicate)
Parent issue: » #2722453: [D7] Improve cron logging

Functionality similar to this already exists in D8+, see #2716073: Improve cron logging. There's a backport of this change in #2722453: [D7] Improve cron logging, so let's merge this issue into that one.