I am just wondering, what is the maximum execution time of a laravel artisan command?
Is it unlimited like php shell scripts or does artisan / laravel have some kind of protection for unlimited looped commands?
Because I wanna make a command that runs forever, as long as the server is running. Is that possible with Laravel Artisan?
thanks
i am just wondering, what is the maximum execution time of a laravel artisan command?
If you run it via the command line - it can be indefinite.
Is it unlimited like php shell scripts or dose artisan / laravel have some kind of protection for unlimited looped commands?
There is no protection - you are free to do what you want.
because i wanna make a command that runs forever, as long as the server is running. Is that possible with Laravel Artisan?
I do something similar - I have a php artisan command that has currently been running for 89 days without issue so far. But as Aross mentioned below, the problem is that if the command does fail for some reason, you need to know about it.
The default is zero, means no time limit. Even though maximum execution time is 30 by default, this does not affect to command line processes.
Check the documentation from here :- http://php.net/manual/en/info.configuration.php#ini.max-execution-time
Hope this helps, Cheers!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With