Skip to content

Commit

Permalink
improve cleanup schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Mar 22, 2024
1 parent 66a32b2 commit 92bfa5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Console/Commands/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public function __construct()
*/
public function handle()
{
$str = "abc";
$diff = strstr($str, ",", true);
$interval = 100;
$diff = sprintf("*/%d * * * *", ceil($interval/60));
dd($diff);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private function registerScheduleCleanup(Schedule $schedule): void
$interval = 7200;
}
$schedule->job(new CheckCleanup())
->cron(sprintf("*/%d * * * *", intval($interval/60)))
->cron(sprintf("*/%d * * * *", ceil($interval/60)))
->withoutOverlapping();
}
}

0 comments on commit 92bfa5d

Please sign in to comment.