<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Trouble with cron.php in a Drupal multisite configuration</title>
	<atom:link href="http://www.darcynorman.net/2006/12/29/trouble-with-cron-php-in-a-drupal-multisite-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darcynorman.net/2006/12/29/trouble-with-cron-php-in-a-drupal-multisite-configuration/</link>
	<description>apparently much happier in person</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:03:04 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: dnorman</title>
		<link>http://www.darcynorman.net/2006/12/29/trouble-with-cron-php-in-a-drupal-multisite-configuration/#comment-82820</link>
		<dc:creator>dnorman</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">730089426#comment-82820</guid>
		<description>Steve (and Alan) - I used to do something similar, having a single script added to my crontab, which in turn contained a list of URLs to curl. The trouble is, on a shared server, I&#039;m not the only one adding sites, so it&#039;s easy to forget to add one, or remove one, so the list gets out of sync pretty quickly. A modified version of Steve&#039;s script that parsed out the value of $base_url for each site would be pretty close to ideal, though. Having the main script fired off as a single cron task is exactly what I want, so each site will be croned sequentially, without having to worry about offsetting by 1 minute to avoid self slashdotting my own server.

Chris - I&#039;ll be checking out drush this afternoon. Thanks! Sounds pretty hopeful, but I&#039;m not sure how I&#039;d run it to cron all of the sites. Time to play around with it :-)</description>
		<content:encoded><![CDATA[<p>Steve (and Alan) &#8211; I used to do something similar, having a single script added to my crontab, which in turn contained a list of URLs to curl. The trouble is, on a shared server, I&#8217;m not the only one adding sites, so it&#8217;s easy to forget to add one, or remove one, so the list gets out of sync pretty quickly. A modified version of Steve&#8217;s script that parsed out the value of $base_url for each site would be pretty close to ideal, though. Having the main script fired off as a single cron task is exactly what I want, so each site will be croned sequentially, without having to worry about offsetting by 1 minute to avoid self slashdotting my own server.</p>
<p>Chris &#8211; I&#8217;ll be checking out drush this afternoon. Thanks! Sounds pretty hopeful, but I&#8217;m not sure how I&#8217;d run it to cron all of the sites. Time to play around with it <img src='http://www.darcynorman.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Dondley</title>
		<link>http://www.darcynorman.net/2006/12/29/trouble-with-cron-php-in-a-drupal-multisite-configuration/#comment-82823</link>
		<dc:creator>Steve Dondley</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">730089426#comment-82823</guid>
		<description>I wrote a simple a perl script that&#039;s run by cron.  I have to manually change the perl script when I add a new site, but if I took an hour (only because I&#039;m so rusty with Perl these days), it could be modified to update itself automatically by searching my multisite /sites directory for the $base_url.  Here it is:

&lt;code&gt;
#!/usr/bin/perl

use strict;
use LWP;
use HTTP::Request::Common;

my $ua = LWP::UserAgent-&gt;new;
my $request;
my $response;
my @drupal_sites = (
        &#039;http://www.domain1.org/cron.php&#039;,
        &#039;http://www.domain2.com/main/cron.php&#039;,
        &#039;http://www.domain3.com/cron.php&#039;,
        );

foreach( @drupal_sites ) {
  $request  = GET($_);
  $response = $ua-&gt;request($request);
  sleep(10);
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I wrote a simple a perl script that&#8217;s run by cron.  I have to manually change the perl script when I add a new site, but if I took an hour (only because I&#8217;m so rusty with Perl these days), it could be modified to update itself automatically by searching my multisite /sites directory for the $base_url.  Here it is:</p>
<p><code><br />
#!/usr/bin/perl</p>
<p>use strict;<br />
use LWP;<br />
use HTTP::Request::Common;</p>
<p>my $ua = LWP::UserAgent->new;<br />
my $request;<br />
my $response;<br />
my @drupal_sites = (<br />
        'http://www.domain1.org/cron.php',<br />
        'http://www.domain2.com/main/cron.php',<br />
        'http://www.domain3.com/cron.php',<br />
        );</p>
<p>foreach( @drupal_sites ) {<br />
  $request  = GET($_);<br />
  $response = $ua->request($request);<br />
  sleep(10);<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ChrisKennedy</title>
		<link>http://www.darcynorman.net/2006/12/29/trouble-with-cron-php-in-a-drupal-multisite-configuration/#comment-82824</link>
		<dc:creator>ChrisKennedy</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">730089426#comment-82824</guid>
		<description>Using http://drupal.org/project/drush might be helpful. I haven&#039;t gotten around to seeing how it works though.</description>
		<content:encoded><![CDATA[<p>Using <a href="http://drupal.org/project/drush" rel="nofollow">http://drupal.org/project/drush</a> might be helpful. I haven&#8217;t gotten around to seeing how it works though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://www.darcynorman.net/2006/12/29/trouble-with-cron-php-in-a-drupal-multisite-configuration/#comment-82825</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">730089426#comment-82825</guid>
		<description>&lt;i&gt;It&#039;s easy enough to drop a curl http://server/site/curl.php into a crontab, but as you start adding sites to the server, it becomes unwieldy to maintain a current crontab of sites to cron.&lt;/i&gt;

At my old Maricopa sites I ended up with a small pile of crons to run that grew incrementally. Like you, I loathed editing the ctrontab file for each addition (I am not a vi fan, and each time, I&#039;d have to review the crontab syntax), so what I did was put in my crontab one call to a single shell script which contained all the curl or other commands needed to issue. Editing that was a matter of just keeping a local text version and ftp-ing it.

A downside might be all of your crons would be chugging at the same hour/minute. I guess you could ave a few shell scripts to run at different intervals. OTOH, it sounds like the tool you are doing should be up to the task, and allow your drupal settings control the timing.</description>
		<content:encoded><![CDATA[<p><i>It&#8217;s easy enough to drop a curl <a href="http://server/site/curl.php" rel="nofollow">http://server/site/curl.php</a> into a crontab, but as you start adding sites to the server, it becomes unwieldy to maintain a current crontab of sites to cron.</i></p>
<p>At my old Maricopa sites I ended up with a small pile of crons to run that grew incrementally. Like you, I loathed editing the ctrontab file for each addition (I am not a vi fan, and each time, I&#8217;d have to review the crontab syntax), so what I did was put in my crontab one call to a single shell script which contained all the curl or other commands needed to issue. Editing that was a matter of just keeping a local text version and ftp-ing it.</p>
<p>A downside might be all of your crons would be chugging at the same hour/minute. I guess you could ave a few shell scripts to run at different intervals. OTOH, it sounds like the tool you are doing should be up to the task, and allow your drupal settings control the timing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
