execute(); if($res == true) { echo '操作成功'; return ExitCode::OK; } } catch (\Exception $e) { echo $e->getMessage(); $this->stderr('BossWeightCrontab Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR)); return ExitCode::UNSPECIFIED_ERROR; } } /** * 股东加权分红状态每天更新定时任务 * 0 20 0 * * * * * @Author: lun * @DateTime: 2021/11/17 0017 20:38 * @Copyright: copyright (c) 2021 广东七件事集团 * @return int */ public function actionUpdateWeightRule(){ try { $logic = new WeightRuleLogic(); $res = $logic->execute(); if($res == true) { echo '操作成功'; return ExitCode::OK; } } catch (\Exception $e) { echo $e->getMessage(); $this->stderr('BossWeightCrontab Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR)); return ExitCode::UNSPECIFIED_ERROR; } } }