123456789101112131415161718192021222324252627282930 |
- <?php
- namespace app\cron;
- use app\common\model\AttendanceUserClass;
- use yunwuxin\cron\Task;
- //昨日未打卡的日期
- class AttendanceReissue extends Task
- {
- public function configure()
- {
- $this->dailyAt('01:10');
- }
- /**
- * 执行任务
- * @return mixed
- */
- protected function execute()
- {
- try{
- $yday = date('Y-m-d',time() - 86400);
- (new AttendanceUserClass())->attendanceReissueFixed($yday); // 固定班制
- (new AttendanceUserClass())->attendanceReissueClass($yday); // 排班制
- }catch (\Exception $e){
- trace($e->getMessage());
- }
- }
- }
|