Cron run failed.

Error Type: 
Core Module
File name:

A Drupal site should periodically execute several house keeping tasks in order to continue functioning correctly. Cron is an operating system tool that allows the system administrator to execute tasks at defined intervals and so it is the ideal way to initiate Drupal's house keeping tasks.

This error message tells you that your Drupal install tried to undertake these house keeping tasks but was not able to. 


This is most likely to be because when it attempted to start the process Drupal discovered that there was already a house keeping task in operation, and the core cron implementation only allows one cron execution at a time. It is crucial to understand why this situation has developed.

When starting a cron process Drupal attempts to acquire a lock to ensure it is the only cron process executing by calling lock_acquire(). The lock_acquire() function uses an entry in the semaphore table to to determine whether a lock can be acquired. If there is an entry already in the semaphore table than no lock can be acquired.

When the cron run completes it should release the lock by removing the entry in the semaphore table.

You could be seeing this error message because every now and then you have a cron job that takes a long time to complete, but once it has completed normal operation is resumed. If this does not cause any problems with normal site operation it is usually safe to leave things as they are. However, if you are frequently seeing this error you may start to see our site performance degrade because it is likely that you are hammering system resources while your long running cron task is executing.


Identify which particular task in your cron run takes a long time to complete and identify ways to allow the operation to complete more efficiently. Optimisng code and database queries is one option, using a queue to break your task down into chunks is another option.


Our aim is to add enough detailed information to each of the Drupal error messages that Drupal developers will be able to fix their own problems. This exercise will take some time to complete, at the last count we had almost 700 error messages in the system.

If your site is suffering from this error message please contact us and ask us to expedite the solution to this error and we will do our best to add a solution as soon as possible.