I want to use the first script from http://drupal.org/node/246091 to run cron for all my drupal multisites but I'm having a problem with $siteNameRegExp and $cronUrl syntax. The instructions aren't very clear, could you give me an example of what goes in there?

So far I've got
$siteNameRegExp = '([a-zA-Z0-9_-])';
$cronUrl = 'http://%s/cron.php';

and it finds all the directories under sites/ (including default/ and all/).

with $siteNameRegExp = '([a-zA-Z0-9_-])\.com'; the dot and c are missing from ".com"

Comments

deendot’s picture

Try this if it's a subdomain:

$siteNameRegExp = '([a-z0-9]\.|[a-z0-9]\.|com)';

Corneloues’s picture

If I wanted to catch all TLD's as well as .com. Such as .co.uk etc.

Could I use the following?

$siteNameRegExp = '([a-z0-9]\.|[a-z0-9]\.[A-Z]{2,4})';

I pulled the TLD bit off of the tuturial page given in the PHP code in the article (http://drupal.org/node/246091) which shows how to read an e-mail address.

Cheers,

Roy

Corneloues’s picture

... for all domains, subdomains and TLD's that I have.

$siteNameRegExp = '([a-z0-9]\.|[a-z0-9]\.[a-zA-Z]{2,4})';

Hope this helps others,

Roy