Running Cron On Dreamhost
This short video shows you how to create a cron job using the Dreamhost web panel that will allow you to execute cron on a Drupal site. As I have noted previously execution of the cron file is an important task for any Drupal site. Many modules rely on cron for periodic processing of data including the core search and aggregator modules. Running cron also prompts the system to check for module updates.
Here's what I entered in the video. Be sure to replace the url with url of your site. wget -qO /dev/null http://yoursite.com/cron.php
This video is one in a series of videos I created called Getting The Most Out Of Dreamhost. If you're a current Dreamhost customer you probably already know how to do things like set up a domain or create a MySQL database so it may not be relevant to you. If you're considering Dreamhost I think the series offers a very good preview of how the web panel functions make it easy to launch new Drupal sites. There's also a discount code (LEARNDRUPAL2010) on that page that will save you $50 on a new Dreamhost web hosting account.
Note: Click the 'full screen' icon (to the left of the volume control) in order to watch online at full 1280x720 resolution.
- learnbythedrop's blog
- 2688 reads


Comments
Re: Running Cron On localhost
Hi,
I am new to Drupal and I would like you to educate me if Cron can be updated on the localhost. Having downloaded Acquia Drupal Stack, I found that I need to set up CRON and update the security check. Could you please guide me on this question.
Thanks,
Jeremiah
Re: Running Cron On localhost
You can run cron manually by going to the link in your browser. The cron.php file is at the top level of the Drupal directory.
Dreamhost can kill cron job, cached cron.php
There are some serious and unique issues with cron on Dreamhost that need to be addressed.
First, the "cached 404 on cron.php" problem. What happens is that (seems to be Dreamhost only), cron.php is not found, resulting in a 404 page being cached for anonymous users, resulting in cron never being run (because it gets the cached 404 page instead).
Second, Dreamhost is *very* aggressive about killing high resource or long-running processes. So cron is the most likely to be killed. That may very well be the issue above, but there is no smoking gun.
I think the best practice for Dreamhost right now is to use drush to run cron, as described in the issue quoted. That way the cached 404 is never an issue. However, Dreamhost will sometimes kill the process, meaning that your cron doesn't get run predictably.
Re: Dreamhost can kill cron job, cached cron.php
I haven't had these problems on my sites. Perhaps it's because I'm on their Private Servers platform.
Re: Dreamhost can kill cron job, cached cron.php
It seems there is a major performance gap between the shared hosting and private servers. I tend to think this is primarily the way dreamhost sets their SQL servers, as this is not unique to Drupal, but manifests itself in wordpress as well.
Re: Running Cron On Dreamhost
I've found using curl a better solution for dreamhost.
http://drupal.org/cron (it's listed here)
1 thing to note as well, sometimes the 'cron lock' feature that the dreamhost panel offers can screw up. If it does and you notice cron no longer running, it could be because of a bogus cron lock that is stuck.
To fix that, simply cd into /tmp, find the lock files and delete them all. Cron should run again.
Post new comment