Initial checkin v13.0
This commit is contained in:
18
src/crons/cronRunner.php
Normal file
18
src/crons/cronRunner.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if(php_sapi_name() != 'cli'){
|
||||
exit();
|
||||
}
|
||||
include "../config.base.php";
|
||||
ini_set('error_log',CRON_LOG);
|
||||
$opts = getopt('f:p:');
|
||||
$file = $opts['f'];
|
||||
$basePath = $opts['p'];
|
||||
|
||||
include (dirname(__FILE__)."/../classes/CronUtils.php");
|
||||
|
||||
$cronUtils = CronUtils::getInstance($basePath, dirname(__FILE__)."/".$file);
|
||||
|
||||
echo "Cron Runner created \r\n";
|
||||
|
||||
$cronUtils->run();
|
||||
|
||||
3
src/crons/echo.php
Normal file
3
src/crons/echo.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include dirname(__FILE__).'/include.cron.php';
|
||||
echo "CLIENT_NAME : ".CLIENT_NAME."\r\n";
|
||||
15
src/crons/include.cron.php
Normal file
15
src/crons/include.cron.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
if(php_sapi_name() != 'cli'){
|
||||
exit();
|
||||
}
|
||||
$opts = getopt('c:');
|
||||
$clientPath = $opts['c'];
|
||||
|
||||
if(empty($clientPath)){
|
||||
echo "No client path defined\r\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
include $clientPath."/config.php";
|
||||
include (APP_BASE_PATH."include.common.php");
|
||||
include("server.includes.inc.php");
|
||||
Reference in New Issue
Block a user