Laravel Scheduled Maintenance is a modern Laravel package for scheduling app maintenance, showing upcoming downtime notices, and customizing the maintenance page. Supports Laravel 10, 11, and 12 with PHP 8.1 and newer.
Note: This package relies on your database. If you are performing significant DB work during a maintenance window, consider using Laravel’s native php artisan down command instead.
This creates a maintenance window titled Server Update, starts maintenance at 2026-05-08 9:00 PM, ends it at 11:00 PM, and shows users an upcoming maintenance notice starting at 8:00 PM.
phpartisanmaintenance:schedule--title="Server Update"--description="We will be performing server upgrades."--starts-at="2026-05-08 21:00:00"--ends-at="2026-05-08 23:00:00"--notify-at="2026-05-08 20:00:00"--bypass-secret="mysecret"--redirect-to="/maintenance"--status-code=503
Option
Description
--title
Title of the maintenance window
--description
Description shown on the maintenance page
--starts-at
Date and time when maintenance starts
--ends-at
Date and time when maintenance ends
--notify-at
Date and time when users should start seeing the upcoming maintenance notice
--bypass-secret
Secret URL path used to bypass maintenance mode (can be auto-generated)
--redirect-to
URL to redirect users to during maintenance
--status-code
HTTP status code returned during maintenance, default is 503
If an option is not provided, the command will ask for it interactively.
Scheduled maintenance automatically dispatches a Laravel queued job that activates the scheduled maintenance time at the starts_at column.
❗ Make sure a laravel queue worker is running via:
Terminal window
phpartisanqueue:work
Note: Make sure your QUEUE_CONNECTION in .env is not set to sync, otherwise delayed jobs will fire immediately instead of at the scheduled time.
QUEUE_CONNECTION=redis # or database
Note: Make sure your server timezone matches the times you schedule. Check config/app.php → timezone and ensure it matches your intended schedule times.
The default view includes a two-column layout with a countdown timer and an illustration. Replace public/vendor/scheduled-maintenance/maintenance.svg with your own illustration if you want.
Comments & Reactions
(click to open)