mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
improve cleanup schedule
This commit is contained in:
@@ -98,8 +98,8 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$str = "abc";
|
||||
$diff = strstr($str, ",", true);
|
||||
$interval = 100;
|
||||
$diff = sprintf("*/%d * * * *", ceil($interval/60));
|
||||
dd($diff);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class Kernel extends ConsoleKernel
|
||||
$interval = 7200;
|
||||
}
|
||||
$schedule->job(new CheckCleanup())
|
||||
->cron(sprintf("*/%d * * * *", intval($interval/60)))
|
||||
->cron(sprintf("*/%d * * * *", ceil($interval/60)))
|
||||
->withoutOverlapping();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user