Skip to content

Glossary

Laravel Artisan: the framework's command line

The command-line tool that ships with Laravel, for recurring tasks, maintenance and scripts of your own.

Artisan is the command line that comes with every Laravel application. Some of the commands come from the framework itself: applying database changes, clearing caches, generating scaffolding, looking inside queues.

The interesting ones are your own. Anything that has to run on the data, regularly or once, becomes one of them. A nightly reconciliation with another system. An export. A correction after a fault.

Why that beats a script on the web

A task that runs for ten minutes has no business in the web server. It runs into a timeout, blocks a process and hangs off an address somebody might call. As an Artisan command it runs outside the web, without time pressure, with proper logging and with no public surface to attack.

For recurring tasks the scheduler joins in. The server calls a single place once a minute. Which task is due when then lives in the application rather than scattered through the server configuration.

FAQ

Häufige Fragen

Do you need server access for this?
For production, yes, usually over an SSH connection or as part of an automated deployment. Tasks meant to run regularly are triggered by the server’s schedule and need no person after that.

Related

Terms that belong with this one

A project, or a question?

Write and tell us what it is about. You get an assessment from somebody who works with Laravel themselves, not from a sales desk.