| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace console\controllers;
- use yii\console\ExitCode;
- use yii\console\Controller;
- use addons\SignIn\common\login\SignInReward;
- use console\services\SiteService;
- /**
- * 站点
- *
- * Class SiteController
- * @package console\controllers
- */
- class SiteController extends Controller
- {
- /**
- * 站点到期提醒
- *
- * @return string
- */
- public function actionDecomeDue()
- {
- try {
- $service = new SiteService();
- $service->expirationDetection();
- echo 'success';
- return ExitCode::OK;
- } catch (\Exception $e) {
- echo '定时任务到期提醒: ' . $e->getMessage();
- $this->stderr('Error: ' . ExitCode::getReason(ExitCode::UNSPECIFIED_ERROR));
- return ExitCode::UNSPECIFIED_ERROR;
- }
- }
- }
|