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