Laravel scheduled tasks not running: the cron entry most people forget

Laravel scheduled tasks not running: the cron entry most people forget

  1. Blog
  2. 15 November 2026
  3. 2 min read

Stefan Bogdanescu

Founder & Senior Architect

You define tasks in routes/console.php or App\Console\Kernel, everything works with php artisan schedule:run by hand - and in production nothing ever runs. The cause is almost always the same: the scheduler is not a daemon. It is a command that something else must trigger every minute, and that something is a single cron entry that deploys routinely forget.

The one cron entry

Laravel's scheduler needs exactly one line in cron, running every minute:

* * * * * cd /var/www/app && php artisan schedule:run >> /dev/null 2>&1

Each minute, schedule:run evaluates your schedule and fires whatever is due. No cron entry, no scheduled tasks - regardless of how perfect the schedule definitions are. On newer Laravel versions you can also verify from the framework's side: php artisan schedule:list shows every defined task and its next due time.

Run it as the right user

The most common broken setup is the entry in root's crontab. Root-run workers create log and cache files in storage/ owned by root, and the next web request throws Permission denied. Install the entry in the crontab of the user that runs PHP-FPM, usually www-data:

sudo crontab -e -u www-data

If your deploys run as a separate user, pick that user consistently for cron, workers and deploys, and keep group ownership of storage/ correct.

Cron's environment is not yours

Cron runs with a minimal PATH and no loaded profile. php artisan schedule:run can fail with "command not found" when php is not on cron's PATH, or load the wrong PHP version on multi-version servers. Use the absolute binary:

* * * * * cd /var/www/app && /usr/bin/php8.3 artisan schedule:run >> /dev/null 2>&1

While debugging, drop the >> /dev/null 2>&1 redirect so failures mail you or land in the syslog: grep CRON /var/log/syslog.

Prove tasks actually fire

Three quick checks:

php artisan schedule:list          # what exists and when it is next due
php artisan schedule:test          # interactive dry-run of due tasks
grep CRON /var/log/syslog | tail   # cron is invoking the entry at all

Inside the schedule, add observability to the tasks that matter:

Schedule::command('reports:send')->daily()
    ->emailOutputOnFailure('ops@example.com')
    ->appendOutputTo(storage_path('logs/scheduler.log'));

Multi-server and overlap traps

On more than one server the cron entry runs on each of them, so every task fires once per server. Add ->onOneServer() (needs a shared cache like Redis) to elect a single runner. For long tasks that could outlive their interval, ->withoutOverlapping() prevents a slow run from stacking on top of itself. Forgetting withoutOverlapping is how a daily report that starts taking 25 hours brings a server down a month later.

Summary

The scheduler is one cron line: every minute, as the PHP-FPM user, with an absolute PHP path. Verify with schedule:list and the syslog, add output logging to important tasks, and use onOneServer() and withoutOverlapping() as soon as the app grows. Write the cron entry into your provisioning script - the day you rebuild the server is the day it gets forgotten again.

Laravel Scheduler Cron DevOps

Our network