1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\cron;
- use app\common\util\AppMsg;
- use think\Db;
- use yunwuxin\cron\Task;
- class ConveyCron extends Task
- {
- public function configure()
- {
- $this->dailyAt("00:00"); //每天执行一次
- }
- /**
- * 执行任务
- * @return mixed
- */
- protected function execute()
- {
- try{
- model("ConveyCron")->plan();
- }catch (\Exception $e){
- trace($e->getMessage());
- }
- }
- }
|