Is there a time limit/max-length of an Artisan Command?

Published 2 months ago by gn0rt0n

How long (time) of a process could I pass off to an Artisan command? Would it be possible to have a Laravel controller spawn an Artisan command that took 15 minutes to run? 30 minutes? What is the top-end for these processes?

CSon
CSon
2 months ago (22,070 XP)

Length is depending on your PHP Settings. But I would seriously reconsider your design approach if you have Scripts running that long.

gn0rt0n

These are processes that I currently handle in Perl. Design isn't the issue. Sometimes work takes that long. Not everything can be handled during a browser session. I am trying to determine if I can unify the codebase under PHP, rather than passing things off to Perl and Python.

Php/Laravel may not be the best fit for these processes though. That is what I am trying to discover.

Thanks for your feedback though.

CSon
CSon
2 months ago (22,070 XP)

For long calculations php is definitely not the best. Regarding design I meant considering to check to refactor your task. E.g. split it up and check for Laravels Task scheduling, queues and whatever else might be useful. In that case commands wouldn't run in the browser session at all, could run in the background and splitter up php time limits shouldn't be an issue

Please sign in or create an account to participate in this conversation.