Artisan.page

horizon:work

Start processing jobs on the queue as a daemon

Terminal
php artisan horizon:work [--name [NAME]] [--delay [DELAY]] [--backoff [BACKOFF]] [--max-jobs [MAX-JOBS]] [--max-time [MAX-TIME]] [--daemon] [--force] [--memory [MEMORY]] [--once] [--stop-when-empty] [--queue [QUEUE]] [--sleep [SLEEP]] [--rest [REST]] [--supervisor [SUPERVISOR]] [--timeout [TIMEOUT]] [--tries [TRIES]] [--json] [--] [<connection>]

Options

backoffOptional

The number of seconds to wait before retrying a job that encountered an uncaught exception

daemonOptional

Run the worker in daemon mode (Deprecated)

delayOptional

The number of seconds to delay failed jobs (Deprecated)

forceOptional

Force the worker to run even in maintenance mode

jsonOptional

Output the queue worker information as JSON

max-jobsOptional

The number of jobs to process before stopping

max-timeOptional

The maximum number of seconds the worker should run

memoryOptional

The memory limit in megabytes

nameOptional

The name of the worker

onceOptional

Only process the next job on the queue

queueOptional

The names of the queues to work

restOptional

Number of seconds to rest between jobs

sleepOptional

Number of seconds to sleep when no job is available

stop-when-emptyOptional

Stop when the queue is empty

supervisorOptional

The name of the supervisor the worker belongs to

timeoutOptional

The number of seconds a child process can run

triesOptional

Number of times to attempt a job before logging it failed

Arguments

connectionOptional

The name of the queue connection to work