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 Cron job not configured on server
- 2 Wrong cron syntax or path
- 3 Cron user permission issues
- 4 Schedule not defined in Console Kernel
- 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('[email protected]');
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.
About Hafiz
Senior Full Stack Developer. I build production software with Laravel, Filament, Vue, and AI integrations, and write about the real decisions behind shipping it.
Get in touch →