Running Laravel script via CLI

Posted 1 year ago by darkec

My script requires long execution, 5+ minutes. The best solution for me is to run my script via CLI, but which way is the best from Laravel's perspective.

  1. I read about Task Scheduling which is a good solution since it is run via Cron Job and that is something I need. But is that script called as CLI command and does it have execution time?

  2. Second is my own command. Which is called via CLI and I can make it execute my script.

Which is better to take and keep in mind I need execution time to be almost unlimited

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.