Recommended Checks and Actions

Check if Cron Is Running Properly

Ensure that Moodle’s cron is running as scheduled. Course deletion relies on cron to process background and ad hoc tasks. If cron is not running or is delayed, course deletions may not proceed as expected.

Check Ad Hoc Tasks

  • Navigate to Site administration → Server → Tasks → Ad hoc tasks

  • Look for failed or delayed tasks related to:

    • Course deletion

    • course_delete_modules

  • If tasks are failing:

    • Manually trigger them via the command line interface (CLI), or

    • Use the Moodle user interface by clicking “Run now”

Avoid Deleting Multiple Large Courses Simultaneously

  • Deleting large courses consumes significant server resources

  • Deleting many courses at the same time may cause task backlogs and failures

  • Delete courses in smaller batches whenever possible to ensure successful completion

Refer to Moodle Performance Recommendations

To further enhance the performance and stability of your Moodle site, refer to the official Moodle documentation: