I have a mysterious cron job that appears once per day in my cron_schedule table. I have spent several hours studying the problem, and I have linked this cron job to an extension that I installed many years ago. I am 100% sure that this cron job is associated with that extension.

But it's not that simple. I removed every single file from this extension several years ago. Since then I have migrated my database and themes to several new clean installs on different servers. Naturally I have flushed my caches hundreds of times since I uninstalled this extension.

Because this extension's files are gone, Magento writes an error message into system.log every time it tries to executes the job, because the associated model file does not exist. The message is along the lines of:

ERR (3): Warning: include(Mage/REDACTED/Model/Observer.php): failed to open stream: No such file or directory

Note that I have redacted the name of the module above because it is a commercial module and I do not want to mention the developer here.

In cron_schedule, the cron job is flagged with an error status and the following message appears after attempted execution:

exception 'Mage_Core_Exception' with message 'Invalid callback: REDACTED/observer::someRedactedFunctionName does not exist'

Here's what I have done to try to exorcise this ghost from my system:

  • Used folder diff to ensure every file from the extension has been deleted
  • Purged all db tables created by the extension
  • Removed all db entries associated with this extension from core_config_data and core_resources
  • Ensured there are no old compilation files under includes/src
  • Flushed caches a million times
  • Did text searches on the entire directory system looking for references to this missing file / module
  • Checked every config.xml file in my system with a <crontab> tag

I just cannot find where this cron job is coming from. Is there any way to debug the system overall to record the origin of each cron job in a log file?

1 Answer 1


Alright, so I solved my problem and learned something interesting about Magento.

I thought all cron jobs were generated from XML settings in config.xml files but it's not that simple. Cron jobs are also generated based on values found in core_config_data.

After doing a series of grep searches on the code base, I did a grep on a dump file of the MySQL database and that's how I found the cronjob entry.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.