15 lines
577 B
Plaintext
15 lines
577 B
Plaintext
# Laravel Scheduler via Supervisor (alternative to cron)
|
|
# Copy to: /etc/supervisor/conf.d/laravel-scheduler.conf
|
|
# This runs the scheduler in a loop instead of using cron
|
|
|
|
[program:laravel-scheduler]
|
|
process_name=%(program_name)s
|
|
command=/bin/bash -c "while [ true ]; do php /var/www/your-app/artisan schedule:run --verbose --no-interaction >> /var/www/your-app/storage/logs/scheduler.log 2>&1; sleep 60; done"
|
|
autostart=true
|
|
autorestart=true
|
|
user=www-data
|
|
numprocs=1
|
|
redirect_stderr=true
|
|
stdout_logfile=/var/www/your-app/storage/logs/supervisor-scheduler.log
|
|
stopwaitsecs=60
|