Run Laravel Scheduler

Run Laravel Scheduler

Laradock provides 2 ways to run Laravel Scheduler 1 - Using cron in workspace container. Most of the time, when you start Laradock, it’ll automatically start workspace container with cron inside, along with setting to run schedule:run command every minute.

2 - Using Supervisord in php-worker to run schedule:run. This way is suggested when you don’t want to start workspace in production environment.
a) Comment out cron setting in workspace container, file workspace/crontab/laradock

# * * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1


b) Create supervisor configuration file (for ex., named laravel-scheduler.conf) for Laravel Scheduler in php-worker/supervisord.d/ by simply copy from laravel-scheduler.conf.example
c) Start php-worker container

原文地址:https://www.cnblogs.com/mouseleo/p/13806294.html