WorkHabit Blogs
WORKHABIT LABSmore love from drupal cron…
What do you do on a site with Drupal cron taking longer than an hour to execute, but where you need to keep the watchdog and access tables from consuming you (think VERY high traffic environments)?
The answer my friend, is to stop calling the cron directly, and start calling a shell script that checks for execution of the cron as a process on the machine your on before calling the cron again. If you don’t do this, you will pay as your cron will stack up processes and crash your machine, and you will be blamed for not ready this post. ;-)
So, here’s the script that we’ve open sourced (yes, there’s no license in the file, I’ll get to it, it’s released as GPL license, so whatever) to handle this situation:
svn co https://svn.firebright.com/svn/public/drupal/contrib/cron_singleton .
This has been very helpful in the higher traffic Drupal environments we work on.
UPDATE: This script has become the “default” for Drupal environments since we released it in October of 2006. If you have comments, please submit them to us.
Cheers!


Post new comment