Add (ai gen)

This commit is contained in:
2023-10-02 09:52:13 +08:00
parent 2df55c2fc9
commit 1bb1eea689

View File

@@ -30,7 +30,7 @@ protected function schedule(Schedule $schedule)
if (!is_null($nextRun)) if (!is_null($nextRun))
{ {
$currentTime = now()->toTimeString(); $currentTime = now()->format('H:i:00');
if ($currentTime == $nextRun->next_run_time) { if ($currentTime == $nextRun->next_run_time) {
@@ -52,7 +52,7 @@ protected function schedule(Schedule $schedule)
{ {
$nextRun = new DailyTaskSchedule; $nextRun = new DailyTaskSchedule;
$nextRun->task = 'my-technology'; $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(); $nextRun->save();
} }
} }