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; 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) ->getNextRunDate(date('Y-m-d H:i:s'), 0, true)
->getTimestamp()) == date('Y-m-d H:i', time()); ->getTimestamp()) == date('Y-m-d H:i', time());

View File

@ -24,7 +24,7 @@
"thans/tp-jwt-auth": "1.1", "thans/tp-jwt-auth": "1.1",
"overtrue/wechat": "^4.2", "overtrue/wechat": "^4.2",
"phpoffice/phpspreadsheet": "^1.12", "phpoffice/phpspreadsheet": "^1.12",
"dragonmantank/cron-expression": "^3.0", "dragonmantank/cron-expression": "3.1",
"symfony/finder": "^4.4", "symfony/finder": "^4.4",
"ext-json": "*", "ext-json": "*",
"overtrue/easy-sms": "^1.1", "overtrue/easy-sms": "^1.1",