I concluded that Artisan command was handled by php-cli and my web requests were handled by fpm. Am I right?
Yes, you are right. Artisan always use php-cli.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm curious to know if the Artisan commands are handled by PHP-CLI OR PHP-FPM. The context of the question is this -
I'm required to run an Artisan command every few seconds. Now my CRON won't go sub-minutes; and therefore I'm thinking of using a loop with sleep(x) -
foreach($items as $item) {
sleep(15);
Artisan::call('some-command');
}
I noticed that while this code executes, I can actually access various parts of my site without any delay; as if there is no connection between the execution of the above loop and browsing.
I concluded that Artisan command was handled by php-cli and my web requests were handled by fpm. Am I right?
Please or to participate in this conversation.