Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How the Laravel 13 Scheduler Works: From Cron Entry to Event Execution

One cron entry runs php artisan schedule:run every minute. Here is how Laravel 13 decides which scheduled events are due, how they execute, and which controls handle overlap, multiple servers, and deployments.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Laravel scheduler has one system-level trigger, a cron entry that runs every minute, and everything else happens inside your application. The cron entry only gives Laravel a chance to check the schedule. Whether a given task actually runs depends on the frequency and constraints you defined, the server’s current time, and a handful of execution controls that handle overlap, deployment, and multiple servers.

The short answer

In a standard production setup, one cron entry runs php artisan schedule:run every minute. That command loads the tasks you defined in application code, works out which ones are due at the server’s current time, and runs those tasks. Each task is an event with a target (a closure, an invokable object, an Artisan command, a queued job, or an operating-system command), a frequency, and optional constraints. Lifecycle hooks, output options, and scheduler events let you see what happened afterward.

As an Amazon Associate I earn from qualifying purchases.

The sections below follow that path in order, then cover the controls that change how events run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 1: Define the scheduled work

Schedules are defined in application code. In Laravel 13.x, the documented location is routes/console.php. Schedules can also be registered through withSchedule in bootstrap/app.php. Choose one place for your project and keep it there, so that anyone reading the code can find every recurring task in one spot.

Each event names what to run and how often. Common examples include an Artisan command, a queued job, or a shell command. The cron entry on the server does not contain the business schedule. It contains only the instruction to ask Laravel what is due.

Step 2: Add one cron entry to the server

The documented server entry is:

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

Replace /path-to-your-project with the absolute path to your application. You add this line once per application, not once per task. Two details matter here:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The >> /dev/null 2>&1 part discards the output of the scheduler process itself. Output from individual tasks is not sent there; it is handled by each event’s own output settings, covered below.
  • The cron entry runs as a user that must be able to execute PHP and read the project. A mismatch in user or PHP binary is one of the most common reasons a schedule appears to do nothing.

Step 3: schedule:run evaluates the schedule

Laravel’s documentation describes the behavior directly: the schedule:run Artisan command “will evaluate all of your scheduled tasks and determine if they need to run based on the server’s current time.” (Source: Laravel, Task Scheduling, Laravel 13.x documentation.)

This evaluation has two parts. First, each event’s frequency expression is checked against the current time. Second, any filters you attached are checked. An event runs only when both pass. Frequencies can be the standard helpers, such as hourly or daily, or a custom cron expression, including intervals as short as every second. Schedules can also specify a timezone, and they can be limited by day of week, specific date, time window, environment, or a condition you supply.

The practical consequence is that a cron invocation is an opportunity to evaluate, not a promise that anything runs. If an event’s expression or filter does not match the current minute, schedule:run moves on without running it.

Step 4: Execute eligible events and their lifecycle

When an event is due and passes its filters, Laravel runs its target. You can attach callbacks that run before the task, after it, or only on success or failure. Laravel also dispatches scheduler events for task starting, finished, skipped, failed, and background-finished states. These let you log, alert, or react without wrapping every task in custom code.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The documentation describes these hooks and the start, execution, and finish behavior from the API side. It does not promise a fixed internal ordering of every step, so write your hooks to stand on their own rather than depend on one callback running before another.

Controls that change how events run

Each control solves a different problem. They are not interchangeable, and one does not replace another.

Control Problem it addresses What it does not do
withoutOverlapping A run takes longer than its interval, and a second instance starts while the first is still going. It does not limit a task to one server. It relies on cache-backed locking, so the cache store must behave consistently for the lock to hold.
onOneServer The scheduler runs on several application servers, and the same task would otherwise run on each. It does not stop overlapping runs of the same task on a single server. Use withoutOverlapping for that.
runInBackground A long command would otherwise block the tasks queued after it. It does not guarantee success. It is available only for Artisan command and shell command tasks, not for closures or jobs.
Maintenance mode handling Tasks should not run while the application is in maintenance mode. By default, scheduled tasks are withheld during maintenance mode. A per-task option lets a specific task run anyway, so use it only for tasks that are safe in that state.
Paused scheduling You need to stop schedule processing temporarily, for example during an incident. Pausing is documented as a schedule-level state with resume support. The API also lets you identify events that should still run while paused.
Output and email options You need to inspect what a command or shell task printed, or be notified of its output. They apply to command and exec tasks. Output is stored only where you direct it.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Sub-minute tasks and deployments

Laravel supports frequencies shorter than a minute. When sub-minute tasks exist, schedule:run keeps running for the rest of the minute so it can process them, instead of exiting immediately. This changes two things.

  • Deployment. A process that is still running may keep executing code from before your deployment for the remainder of its minute. Laravel documents running php artisan schedule:interrupt after deploying, so the in-progress invocation stops and the next one loads the new code.
  • Process lifetime. If you monitor the scheduler by checking whether the process exits, expect it to live for up to a minute at a time when sub-minute tasks are present.

Local development

On your own machine you do not need a cron entry. Run php artisan schedule:work. It runs in the foreground and invokes the scheduler every minute. If you have sub-minute tasks, it processes them within each minute. Stop it with Ctrl+C when you are done.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Checking what is scheduled

To see the configured events and their upcoming run times, run php artisan schedule:list. This is the fastest way to confirm that a task is registered with the expression and timezone you intended, before you wait for it to fire.

When an event does not run: a troubleshooting sequence

  1. Confirm the cron entry exists and runs. Check that the line is installed for the correct user. Because the entry discards its own output, verify with php artisan schedule:list and a test event rather than the cron log.
  2. Confirm the event is registered. Run php artisan schedule:list. If the event is missing, the definition is in the wrong file or was not loaded.
  3. Check the time. Compare the frequency and timezone with the server’s current time. A daily task scheduled in one timezone will not run at the same local time elsewhere.
  4. Check constraints. A day-of-week, environment, or conditional filter may be excluding the event. Test the condition in isolation.
  5. Check maintenance and pause state. If the application is in maintenance mode or scheduling is paused, a due event may be withheld by design.
  6. Check overlap. If the task is still running from a previous minute, withoutOverlapping will skip the new run. Look for a stuck process and the cache lock.
  7. Check the lifecycle hooks. Use failure and skipped events to learn whether the event ran and failed, or was skipped before running.

What a cron invocation does not prove

A successful cron run only shows that schedule:run executed. It does not show that each task finished, succeeded, or produced the expected result. Use the task hooks, output settings, and scheduler events to judge outcomes. Treat the cron log as evidence that the trigger fired, nothing more.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.