N
N
NubasLol2021-05-17 14:01:34
Laravel
NubasLol, 2021-05-17 14:01:34

How to run artisan command in background without queues?

How to run a command to work in the background, just like the schedule:run task scheduler does.

But I want to do this in the controller.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly, 2021-05-17
@AnatolTh

exec('nohup php artisan some:command > /dev/null &');

K
Kladislav, 2021-05-18
@Kladislav

Artisan::call(Command::class)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question