<?php
/**
 * @todo   一个月运行一次,收取QC卡位费2
 * @author Felix
 */
set_time_limit(7200);
require_once ('config.php');

$flagFile = APPLICATION_PATH . '/../data/log/QckwMonthFee.lock';
if (@file_exists($flagFile)) {
	echo 'Anather process is running.'."\r\n";
	echo $flagFile."\r\n";
	exit();
}
//防止重复调用生成文件
$link = fopen($flagFile, 'wb');
fclose($link);

define('RUNTIME', '[' . date('Y-m-d H:i:s') . '] ');
echo RUNTIME . "Starting.\r\n\r\n";

$obj = Process_QckwfProcess::getInstance();
$obj->run('QCKWF-02');

echo "\r\n[" . date('Y-m-d H:i:s') . "] End run\r\n";
@unlink($flagFile);