0
0

AttendanceReissue.php 657 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\cron;
  3. use app\common\model\AttendanceUserClass;
  4. use yunwuxin\cron\Task;
  5. //昨日未打卡的日期
  6. class AttendanceReissue extends Task
  7. {
  8. public function configure()
  9. {
  10. $this->dailyAt('01:10');
  11. }
  12. /**
  13. * 执行任务
  14. * @return mixed
  15. */
  16. protected function execute()
  17. {
  18. try{
  19. $yday = date('Y-m-d',time() - 86400);
  20. (new AttendanceUserClass())->attendanceReissueFixed($yday); // 固定班制
  21. (new AttendanceUserClass())->attendanceReissueClass($yday); // 排班制
  22. }catch (\Exception $e){
  23. trace($e->getMessage());
  24. }
  25. }
  26. }