diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 1e99ce3..5c2cc64 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -30,7 +30,7 @@ protected function schedule(Schedule $schedule) if (!is_null($nextRun)) { - $currentTime = now()->toTimeString(); + $currentTime = now()->format('H:i:00'); if ($currentTime == $nextRun->next_run_time) { @@ -52,7 +52,7 @@ protected function schedule(Schedule $schedule) { $nextRun = new DailyTaskSchedule; $nextRun->task = 'my-technology'; - $nextRun->next_run_time = now()->addMinutes(rand(0, 1440))->toTimeString(); + $nextRun->next_run_time = now()->addMinutes(rand(0, 1440))->format('H:i:00'); $nextRun->save(); } }