While testing the backup and restore capabilities of this module, I noticed that if my cron was running while the export happened, it would still think the cron was running when I restored the database (due to the cron_semaphore variable existing in the variable table in the database). This of course resulted in the inability to run the cron at that point. If left long enough, it leads to the "Cron has been running for more than an hour and is most likely stuck" error in the watchdog, and the "Attempting to re-run cron while it is already running" when I tried to run the cron.
In short, is it worthwhile to suggest in the documentation to check for the cron_semaphore variable when restoring a backup and deleting it if it exists? Something like "After restoring from a backup, be sure to check the 'variables' table in your database for the cron_semaphore variable. If this variable exists in the table, then the system will think that the cron is currently running, and your cron will not run. Simply delete this variable from the table and clear your cache in Performance.".
Fantastic module, by the way!
Comments
Comment #1
ronan CreditAttribution: ronan commentedSounds more like something I should handle in the code. Thanks for the heads up.
Comment #2
ronan CreditAttribution: ronan commentedThis should be fixed in the latest dev.
Thanks
Ronan