Download the PHP package pharaonic/laravel-executor without Composer
On this page you can find all versions of the php package pharaonic/laravel-executor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pharaonic/laravel-executor
More information about pharaonic/laravel-executor
Files in pharaonic/laravel-executor
Package laravel-executor
Short Description Run one-time and recurring deployment tasks on your Laravel servers: Artisan commands, jobs and custom actions, tracked in batches with rollback, tags and per-server targeting.
License MIT
Informations about the package laravel-executor
Run deployment tasks in Laravel once or on every deploy.
Artisan commands, queued jobs and data fixes, tracked in batches with rollback.
Installation
The service provider is registered automatically, and the package loads its migration, so php artisan migrate creates the executors table.
Usage
An executor is a deployment task, such as clearing caches, dispatching a job, or fixing data. Each one lives in its own file, runs once or on every deploy, and is tracked in a batch that can be rolled back.
Create an Executor
The command creates a timestamped file in the executors folder, such as executors/2026_01_15_120000_warm_caches.php:
| Type | Runs |
|---|---|
ExecutorType::ONCE |
The first time php artisan execute sees it, then never again |
ExecutorType::ALWAYS |
Every time php artisan execute runs (the default) |
$this->command() calls an Artisan command and $this->job() dispatches a job. down() runs when the executor's batch is rolled back.
Run the Executors
Add it to your deploy script:
Executors run in file-name order, and every executor that runs for the first time in the same call shares one batch. Run one executor by name, or only the executors with one of the given tags:
Several Servers
$servers limits an executor to some servers, by name or by IP address. Name each server with EXECUTOR_SERVER, which keeps working when its address changes, such as in Docker:
An executor with $servers keeps one record per server, so a ONCE executor runs once on each listed server. Leave $servers empty for work one server does for all of them.
When servers deploy at the same time, php artisan execute takes a lock in the executors table, so they run the executors one after another and a ONCE executor never runs twice.
Roll Back and Check
execute:fresh runs every ONCE executor again, so keep it to local and testing environments.
Documentation
For configuration, executor paths, the API reference, examples, troubleshooting, and upgrading from 1.x, see the Laravel Executor Documentation.
Contributing
Contributions are welcome. See CONTRIBUTING.md.
Support & Security
See SECURITY.md.
License
MIT. See LICENSE.
All versions of laravel-executor with dependencies
laravel/framework Version ^13.0
pharaonic/php-dot-array Version ~8.3.1 || ~8.4.2 || ~8.5.2
pharaonic/php-smart-enum Version ~8.3.0 || ~8.4.0 || ~8.5.1
