...
 

Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

A vector illustration of a large, complex automated system with jammed tasks. - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

Moodle depends on cron to keep important background tasks running. When cron stops, the site may still load normally at first, but many automated features slowly begin to fail. Notifications may stop sending, course completion may not update, forum posts may be delayed, reports may not refresh, and scheduled tasks may remain stuck with a next run time of ASAP.

Because cron works behind the scenes, many Moodle administrators do not notice the problem until users report missing emails, delayed enrolments, expired access problems, or broken automated workflows. Understanding the symptoms and causes of a failed Moodle cron job can help you diagnose the issue before it affects students, teachers, and administrators across the site.

This article explains what Moodle cron does, how to recognize when it is not running, common causes of cron failure, and practical steps to fix it.

I am Director of Rahab Ministry (a program of Youth Unlimited). We are impressed with Mindfield’s IT specialists in helping us redesign a website (Rahab.yugta.ca) and their ongoing support. They were responsive and helped us think ahead instead of waiting for us to tell them what needed to be done. We will continue to look forward to their support.

 

Joanna Yee
Director, Rahab Ministry.

review Source: Google Reviews

 

Outline

 

 

What Is Moodle Cron?

A wide complex system of scheduled automated tasks. - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

Moodle cron is a background process that runs scheduled work for the Moodle site. Instead of requiring users or administrators to manually trigger every automated action, Moodle uses cron to process tasks at regular intervals.

Cron helps Moodle handle background jobs such as:

• Sending forum notifications and other system messages
• Processing course completion and activity completion updates
• Running scheduled reports
• Cleaning temporary files
• Processing enrolment changes
• Running plugin background tasks
• Processing ad hoc tasks created by Moodle or third party plugins
• Updating statistics, logs, and other background data

In most Moodle environments, cron is configured on the server to run the Moodle CLI cron script regularly. If this server side configuration is missing, broken, or using the wrong PHP path, Moodle tasks will not run correctly.

 

Common Symptoms of Moodle Cron Not Running

An illustration of multiple automated systems in a state of stasis and delay - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

When Moodle cron is not running, the symptoms can appear in different areas of the site. Some issues are visible to users, while others only appear in the administrator interface.

Emails and Notifications Are Not Being Sent

One of the most common signs of cron failure is that Moodle emails stop sending. This may include forum notifications, assignment reminders, course completion messages, password related messages, and other automated emails.

Users may report that they expected an email but never received it. Teachers may notice that students are not receiving forum updates. Administrators may see queued messages that are not being processed.

This does not always mean the email server is broken. If Moodle cron is not running, Moodle may never reach the step where those messages are processed and handed over to the mail system.

Scheduled Tasks Show as Overdue

Administrators can check scheduled tasks from the Moodle admin area. If many tasks show a next run time of ASAP, or if the last run time is very old, this is a strong sign that cron is not running correctly.

A few overdue tasks may not always indicate a major problem, especially if a specific task has failed because of a plugin issue. However, if many core tasks are overdue, the cron process itself should be checked.

Ad Hoc Tasks Are Stuck

Moodle also uses ad hoc tasks for background jobs that need to be queued and processed later. These tasks may be created by course actions, enrolment changes, completion tracking, backups, plugins, or other processes.

If cron is not running, ad hoc tasks can pile up. This may cause delays in completion updates, report processing, notifications, and plugin related actions.

Course Completion and Activity Completion Are Delayed

If students complete an activity but the course completion status does not update, cron may be part of the issue. Some completion related processes depend on scheduled or background task processing.

This can affect certificates, restricted access, progress tracking, dashboards, and reports that depend on completion data.

Reports Are Not Updating

Many Moodle reports depend on scheduled background processing. If cron stops, reports may show outdated data even though users are actively working in courses.

This can create confusion for administrators and instructors who rely on reports for compliance, participation tracking, training records, or learner progress reviews.

Backups and Automated Maintenance Do Not Run

Automated course backups, cleanup tasks, and maintenance jobs may fail to run if cron is not working. This can lead to missing backups, growing temporary files, and performance issues over time.

A Moodle site may still appear usable, but background maintenance problems can gradually affect stability and storage.

Plugins Stop Processing Background Work

Many Moodle plugins rely on cron. A plugin may appear installed and configured correctly, but its background features may not work if cron is not running.

Examples can include reporting plugins, attendance tools, certificate plugins, notification plugins, enrolment plugins, video tools, or integration plugins.

Common Causes of Moodle Cron Failure

A stalled automated data factory with multiple distinct visual representations of failures - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

Cron problems can happen for several reasons. Some are caused by server configuration, while others are caused by Moodle settings, PHP changes, permissions, or plugin failures.

Cron Was Never Configured on the Server

A common installation issue is that Moodle was installed successfully, but the server cron job was never added. Moodle can still load without cron, so the site may appear functional at first.

However, over time, automated tasks will stop working because there is no server process calling Moodle cron.

The Cron Command Uses the Wrong Path

The cron command must point to the correct PHP binary and the correct Moodle cron script. If Moodle was moved to a new directory, restored to a staging site, upgraded, or migrated to another server, the old cron path may no longer be valid.

For example, the command may still point to an old Moodle folder, a deleted folder, or a staging path that no longer exists.

The Wrong PHP Version Is Being Used

Moodle may require a specific PHP version depending on the Moodle version. If the cron job uses a different PHP version from the web server, cron may fail even though the Moodle site loads in the browser.

This can happen after a server upgrade, PHP upgrade, cPanel change, or Moodle version upgrade.

File Permissions Are Incorrect

Cron usually runs under a specific server user, such as www-data on many Linux servers. If that user does not have the correct permission to access Moodle files, moodledata, cache folders, or plugin files, cron may fail.

Permission issues are common after manual file transfers, restore operations, or ownership changes.

Cron Is Disabled in Moodle Task Processing Settings

Moodle includes task processing settings where cron and task processing can be enabled or disabled. If cron processing was disabled during troubleshooting or maintenance and not reenabled, scheduled tasks may stop running.

This should be checked from the Moodle admin interface.

A Plugin Task Is Failing

Sometimes cron is running, but a specific scheduled task fails every time it runs. This can block or delay related processes, especially if the task belongs to a plugin with a missing dependency, broken API connection, outdated code, or version mismatch.

In this situation, the issue is not always the cron schedule itself. The failed task needs to be reviewed from the scheduled tasks page, logs, plugin settings, or server output.

The Site Has Pending Upgrade Steps

After a Moodle upgrade or plugin update, cron may not behave normally if Moodle still has pending database upgrade steps. Administrators should complete the Moodle upgrade process and check the notifications page before assuming the cron job itself is broken.

Server Cron Service Is Not Running

On Linux servers, the system cron service itself must be running. If the service is stopped or misconfigured, Moodle cron will not be triggered even if the Moodle command is correct.

This is especially important after server reboots, migrations, container changes, or hosting changes.

 

How to Check Whether Moodle Cron Is Running

An isometric illustration of a technician re-coupling a glowing conduit on a central task hub to restart stalled automated modules. - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

Administrators can use several methods to confirm whether cron is working.

Check Moodle Notifications Page

Go to: Site administration > Notifications

If Moodle reports that cron has not run recently, this is a direct warning that the site needs attention.

Check Moodle Scheduled Tasks

Go to: Site administration > Server > Tasks > Scheduled tasks

Review the last run time and next run time for key tasks. If many tasks have not run recently, or if many show ASAP, cron may not be running.

Check Moodle Ad Hoc Tasks

Go to: Site administration > Server > Tasks > Ad hoc tasks

If there is a large queue of stuck or overdue tasks, cron may not be processing them properly.

Run Moodle Cron Manually from the Command Line

If you have server access, you can manually run Moodle cron from the command line. A common command looks like this:

/usr/bin/php /path/to/moodle/admin/cli/cron.php

The exact PHP path and Moodle path depend on the server. If the command runs successfully, review the output for failed tasks, missing files, permission errors, PHP errors, or plugin errors.

Check the Moodle Server Crontab

On Linux servers, the cron job may be defined in the crontab for the web server user or root user. A typical setup runs Moodle cron regularly, often every minute.

The cron entry may look similar to this:

* * * * * /usr/bin/php /path/to/moodle/admin/cli/cron.php >/dev/null

The exact command should match the correct Moodle site path and server PHP path.

 

How to Fix Moodle Cron Not Running

A technician turns a large geared valve, restoring flow. - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

The correct fix depends on the cause. Start with the simplest checks before making server changes.

  • Confirm the Correct Moodle Path

Make sure the cron command points to the active Moodle folder, not an old backup, staging directory, deleted directory, or previous version folder.

This is especially important after upgrades, staging restores, or site migrations.

  • Confirm the Correct PHP Path

Check which PHP version Moodle requires and which PHP binary the cron job is using. If the site was upgraded, the old PHP binary may no longer be compatible.

On some servers, multiple PHP versions exist at the same time, so the cron job must call the correct one.

  • Use CLI Cron When Possible

For most Moodle sites, CLI cron is preferred because it is more reliable and less dependent on web requests. The CLI command should call:

admin/cli/cron.php

rather than relying on a browser based cron URL.

  • Review File Ownership and Permissions

Check that Moodle files and moodledata are accessible to the user running cron. If files were copied manually, the ownership may need to be corrected.

For example, on many Linux Moodle servers, Moodle files and moodledata are owned by the web server user. The exact user depends on the server configuration.

  • Check Moodle Task Processing Settings

Review task processing settings in Moodle to confirm that cron and task processing are enabled. If task processing was disabled during maintenance, reenable it after confirming the site is stable.

  • Investigate Failed Scheduled Tasks

If cron is running but certain tasks keep failing, review the task name, component, and error output. The problem may be related to a plugin, API connection, missing configuration, outdated code, or server dependency.

Do not ignore repeated failed tasks. A single broken task can affect reports, enrolments, notifications, or integrations.

  • Complete Pending Moodle Upgrade Steps

After a Moodle upgrade or plugin upgrade, visit the notifications page and complete any pending upgrade steps. Cron should be tested again after the upgrade process is fully completed.

  • Check Server Logs

Server logs can help identify PHP errors, permission problems, memory limits, timeout errors, or missing files. If cron runs from the command line but fails automatically, check the system cron logs as well.

 

Best Practices for Reliable Moodle Cron

Reliable, redundant parallel server systems in an optimized data center. - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

A healthy cron setup is important for Moodle stability. These best practices can reduce future problems.

• Run Moodle cron regularly, commonly every minute
• Use CLI cron where possible
• Keep the cron command updated after site moves or upgrades
• Check scheduled tasks after Moodle upgrades
• Review failed tasks regularly
• Monitor ad hoc task queues
• Confirm PHP compatibility after server changes
• Avoid leaving cron disabled after maintenance
• Document the correct cron command for each Moodle site
• Test cron after staging migrations and production launches

 

Keep Moodle’s Background Engine Running Smoothly

An expert guiding connected learners showing expert intervention in notification systems - Moodle Cron Not Running: Common Symptoms, Causes, and Fixes

Cron issues can be difficult to diagnose because the visible symptoms often appear in different parts of Moodle. Missing emails, delayed course completion, outdated reports, and stuck scheduled tasks may look like separate problems, but they can all point back to the same background process. A Moodle expert can review the full chain, including the server cron command, PHP version, task logs, file permissions, plugin tasks, and Moodle configuration, to identify the real cause quickly.

Working with a Moodle expert also helps prevent cron problems from returning after upgrades, migrations, staging site builds, or hosting changes. For organizations that rely on Moodle for training records, compliance reporting, course access, and automated notifications, stable cron processing is essential. Expert support ensures that background tasks continue to run properly, so administrators can trust that Moodle is processing emails, reports, completions, and automated workflows as expected.

 

Frequently Asked Questions (FAQs)

What happens if Moodle cron is not running?

If Moodle cron is not running, automated background tasks may stop working. This can affect emails, notifications, course completion, reports, backups, enrolments, plugin tasks, and other scheduled processes.

How do I know if Moodle cron has stopped?

You can check Site administration > Notifications for cron warnings. You can also review scheduled tasks and ad hoc tasks to see whether tasks are overdue, stuck, or showing old last run times.

How often should Moodle cron run?

For most Moodle sites, cron should run regularly, commonly every minute. This helps scheduled tasks and ad hoc tasks process without long delays.

Should Moodle cron run through the browser or command line?

When possible, Moodle cron should run through the command line using the CLI cron script. CLI cron is usually more reliable for production Moodle sites.

Why are Moodle scheduled tasks showing ASAP?

If many scheduled tasks show ASAP, cron may not be running or tasks may be delayed. If only one task shows repeated failure, the issue may be related to that specific task, plugin, or configuration.

Can a Moodle plugin break cron?

A plugin can cause scheduled task failures if it has outdated code, missing configuration, API connection problems, or compatibility issues. In that case, cron may still run, but the plugin task may fail repeatedly.

Why did cron stop after a Moodle upgrade?

Cron may stop after an upgrade if the command points to the old Moodle folder, uses the wrong PHP version, has permission issues, or if Moodle still has pending upgrade steps.

Can cron issues affect Moodle emails?

Yes. Many Moodle emails and notifications depend on background task processing. If cron is not running, Moodle may not process or send certain automated messages.

Request Consultation

    *By submitting you agree to the Mindfield  Terms of Use.

    Andy