2009-06-03 10:27:27 +02:00
|
|
|
#!/usr/bin/php -qC
|
2006-03-09 21:40:23 +01:00
|
|
|
<?php
|
2009-06-03 10:27:27 +02:00
|
|
|
/**
|
|
|
|
* API - run Timed Asynchron Services for all EGroupware domain/instances
|
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @author Lars Kneschke
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package api
|
|
|
|
* @access public
|
|
|
|
* @version $Id$
|
|
|
|
*/
|
2006-03-09 21:40:23 +01:00
|
|
|
|
2009-06-03 10:27:27 +02:00
|
|
|
$path_to_egroupware = realpath(dirname(__FILE__).'/../..'); // need to be adapted if this script is moved somewhere else
|
|
|
|
$php = isset($_ENV['_']) ? $_ENV['_'] : $_SERVER['_'];
|
2006-03-09 21:40:23 +01:00
|
|
|
|
2009-06-03 10:27:27 +02:00
|
|
|
foreach(file($path_to_egroupware. '/header.inc.php') as $line)
|
|
|
|
{
|
|
|
|
if(preg_match("/GLOBALS\['egw_domain']\['(.*)']/", $line, $matches))
|
|
|
|
{
|
2010-08-23 18:32:33 +02:00
|
|
|
// -d memory_limit=-1 --> no memory limit
|
|
|
|
system($php. ' -q -d memory_limit=-1 '.$path_to_egroupware.'/phpgwapi/cron/asyncservices.php '. $matches[1]);
|
2006-03-09 21:40:23 +01:00
|
|
|
}
|
2009-06-03 10:27:27 +02:00
|
|
|
}
|