初始化代码
This commit is contained in:
39
application/common/command/GuildWages.php
Normal file
39
application/common/command/GuildWages.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\command;
|
||||
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use app\admin\model\ReloadDb;
|
||||
|
||||
class GuildWages extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('guild-wages')
|
||||
->setDescription('公会工资结算'); //
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理过期装扮
|
||||
* @param Input $input
|
||||
* @param Output $output
|
||||
* @return int|void|null
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
// set_time_limit(0);
|
||||
ini_set ('memory_limit', '128M');
|
||||
while (true) {
|
||||
ReloadDb::init();
|
||||
model('api/RoomWages')->batch_give_guild_subsidy();
|
||||
echo '公会工资监控!'.date('Y-m-d H:i:s').PHP_EOL;;
|
||||
sleep(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user