LoginSignup
0
1

More than 3 years have passed since last update.

Laravelのタスクスケジュールが動かない(24時設定)

Posted at

昨日まで動いていたのに、今日は動かない・・・
昨日のリリースが悪いのかしら。。でも何も悪いことしていないのに・・・

スケジュール定義を見直そう

スケジュールタスクは全部App\Console\Kernelクラスのscheduleメソッドの中に定義します。
この定義でミスしていました。
毎日24時に実行したいからって

$schedule->command('cms:update-article-point')->dailyAt('24:00');

と書くと落ちます。こんなログを吐いて死にます。

In CronExpression.php line 155:
  Invalid CRON field value 24 at position 1

このように書きましょう。

$schedule->command('cms:update-article-point')->dailyAt('00:00');
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1