0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravelのバッチを動かすためのcron設定手順

Posted at

Laravelでバッチ処理

Laravelのバッチ処理を実行するためにcronを設定する。

cron設定手順

ルートユーザーへ切り替え

$ sudo su

ディレクトリを移動

$ cd /var/spool/cron

cron設定を編集

$ vim root

下記を記述する。

#Ansible: laravel scheduler
* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1

毎秒ごとに/var/www/html のディレクトリでartisan schedule:runのコマンドが実行される。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?