Scheduling Laravel 8 Laravel 9 Laravel 10 Laravel 11 Laravel 12

Laravel Scheduler Not Running - How to Fix

This issue occurs when Laravel's scheduled tasks don't execute, usually due to missing cron job configuration.

The Error

Error Message
Scheduled commands not running

Common Causes

  1. 1 Cron job not configured on server
  2. 2 Wrong cron syntax or path
  3. 3 Cron user permission issues
  4. 4 Schedule not defined in Console Kernel
  5. 5 Task throwing exceptions silently

Solutions

1

Add Laravel scheduler to crontab

Bash
# Edit crontab
crontab -e

# Add this line (adjust path to your project)
* * * * * cd /var/www/your-project && php artisan schedule:run >> /dev/null 2>&1
2

Define schedule in Console Kernel

PHP
// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
    $schedule->command('inspire')->hourly();
    $schedule->command('backup:clean')->daily()->at('01:00');
    $schedule->command('telescope:prune')->daily();
    
    // Custom closure
    $schedule->call(function () {
        // Your code
    })->everyMinute();
}
3

Test scheduler locally

Bash
# Run scheduler once (for testing)
php artisan schedule:run

# List all scheduled tasks
php artisan schedule:list

# Run scheduler continuously (local dev)
php artisan schedule:work
4

Debug scheduled tasks

PHP
// Add output and error logging
$schedule->command('your:command')
    ->daily()
    ->appendOutputTo(storage_path('logs/scheduler.log'))
    ->emailOutputOnFailure('admin@example.com');

Need Help With Your Laravel Project?

I specialize in building custom Laravel applications, process automation, and SaaS development. Whether you need to eliminate repetitive tasks or build something from scratch, let's discuss your project.

Currently available for 2-3 new projects

Hafiz Riaz

About Hafiz

Full Stack Developer from Italy. I build web applications with Laravel and Vue.js, and automate business processes. Creator of ReplyGenius, StudyLab, and other SaaS products.

View Portfolio

Related Errors