Skip to content

Background Jobs

FreeScout edited this page Mar 9, 2023 · 20 revisions

Queued jobs are processed by schedule:run cron task. This task runs queue:work daemon which processed queued jobs. You can view jobs status under Manage » System » Jobs (normally there should be zero jobs in the queue).

If jobs are not being processed:

1) Run ps aux | grep queue command to check if queue:work daemon is running:

ps aux | grep queue
freescout  5534  0.0  0.0   9540  2292 ?        S    02:01   0:00 sh -c php 'artisan' queue:work --queue='emails' --tries=7 --sleep=3
freescout  5535  0.0  0.1 284580 34116 ?        S    02:01   0:00 php artisan queue:work --queue=emails --tries=7 --sleep=3

If there are more than 2 processes running, clear application cache (see #3) or kill them manually:

kill -KILL 5534 5535

2) If queue:work daemon is not running , make sure that you have schedule:run cron task configured.

3) Clear application cache to kill all queue:work daemons and to remove all jobs mutexes:

php artisan freescout clear-cache

4) Check daemon log: /storage/logs/queue-jobs.log

Clone this wiki locally