update:更新crontab

This commit is contained in:
JaguarJack
2021-02-07 09:42:01 +08:00
parent 0efe79ddb3
commit 1495a4c731
2 changed files with 3 additions and 2 deletions

View File

@@ -105,7 +105,8 @@ class ScheduleCommand extends Command
return true;
}
$can = date('Y-m-d H:i', CronExpression::factory(trim($command->cron))
$can = date('Y-m-d H:i',
(new CronExpression(trim($command->cron)))
->getNextRunDate(date('Y-m-d H:i:s'), 0, true)
->getTimestamp()) == date('Y-m-d H:i', time());