示例#1
0
            $cronTask->save();
        }
    }
    echo 'all out string:' . $outStr;
}
register_shutdown_function('__shutdown');
if (isset($config)) {
    $app = Yii::createApplication('ConsoleApplication', $config);
    $app->commandRunner->addCommands(YII_PATH . '/cli/commands');
    $env = @getenv('YII_CONSOLE_COMMANDS');
    if (!empty($env)) {
        $app->commandRunner->addCommands($env);
    }
} else {
    $app = Yii::createConsoleApplication(array('basePath' => dirname(__FILE__) . '/cli'));
}
require_once 'common/components/shortcuts.php';
CronTask::$uniqKey = $uniqKey;
CronTask::$executeTimestamp = $executeTimestamp;
//die();
$app->run();
/* Below - the old version of this file*/
/*
defined('YII_DEBUG') or define('YII_DEBUG',true);

$root=dirname(__FILE__);
$config=$root.'/config/main.php';

require_once($root.'/../common/lib/global.php');
require_once($root.'/../common/lib/yii-1.1.8/yiic.php');
*/