diff --git a/app/Console/Commands/ResetTraffic.php b/app/Console/Commands/ResetTraffic.php index 4c90b1ad8..95c40d818 100644 --- a/app/Console/Commands/ResetTraffic.php +++ b/app/Console/Commands/ResetTraffic.php @@ -181,6 +181,12 @@ private function resetByExpireDay($builder): void $usersToUpdate = []; foreach ($users as $user) { + $expireMonth = date('m', $user->expired_at); + $currentMonth = date('m'); + if ($expireMonth == $currentMonth) { + continue; + } + $expireDay = date('d', $user->expired_at); if ($expireDay === $today || ($today === $lastDay && $expireDay >= $today)) { $usersToUpdate[] = [