Admin tools: Cron lock statistics

Maintained by Picture of Catalyst ITCatalyst IT, Picture of Brendan HeywoodBrendan Heywood, Picture of Nicholas HoobinNicholas Hoobin
A lock statistics admin tool, specifically tailored to report on cron task timings. This tool exposes which tasks are currently running and where, and also shows a detailed history of how long each task has taken in the past.
165 sites
29 fans
Moodle 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3

If you've ever had issues with cron being slow, or wanted to get insight into what cron was doing *last night* after the fact, then this plugin is a great tool to have in your toolbox. It will tell you:

  • What cron tasks are running, right now, and what boxes they are running on (great if you have multiple front ends or auto scaling cron clusters)
  • Clearly show which tasks are problematic / slow
  • A full history of what tasks have run and when, along with timing statistics
  • For big / slow tasks these are stored with more detail so you can also use this to see improvement in cron performance after code changes or infrastructure changes

For more details including the installation and configuration steps please see:


Screenshot #0
Screenshot #1


Picture of Catalyst IT
Catalyst IT (Lead maintainer)
Picture of Brendan Heywood
Brendan Heywood: Solutions Architect
Picture of Nicholas Hoobin
Nicholas Hoobin: Lead developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Wed, Jul 5, 2017, 2:50 PM
    Approval issue created: CONTRIB-6966
  • Picture of David Mudrák
    Fri, Jul 7, 2017, 7:56 PM

    Thanks for sharing this plugin! I found it really useful, well designed and nicely implemented. It actually addresses the exact issues with cron and scheduled tasks we've been experimenting on our own sites.

  • Ricardo Caiado
    Tue, Apr 3, 2018, 8:34 AM
    Is there any moodle 3.4+ update?
  • Picture of Bert van der Hooft
    Mon, Nov 4, 2019, 11:21 PM
    Left plugin unattended? Doesn't work in 3.7
  • Picture of Bei Chapman
    Sat, May 16, 2020, 1:18 AM
    I just tried to install it into my 3.6.3 moodle dev, and got this error. Does it mean something not right in my environment or the plugin just doesn't work in 3.6?


    === error ===
    Debug info: Errors found in XMLDB file: PATH attribute does not match file directory: admin/tool/lockstats/db
    Error code: ddlxmlfileerror

    Stack trace:

    line 352 of /lib/ddl/database_manager.php: ddl_exception thrown
    line 368 of /lib/ddl/database_manager.php: call to database_manager->load_xmldb_file()
    line 599 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
    line 1852 of /lib/upgradelib.php: call to upgrade_plugins()
    line 694 of /admin/index.php: call to upgrade_noncore()
Please login to post comments