Menu

Laravel Scheduler Not Running: Cron and schedule:run Fixes
📰

Laravel Scheduler Not Running: Cron and schedule:run Fixes

DEV Community: laravel·devTalk·1 day ago
#fZRMTAca
#devtolaravel#devto#dev#schedule#cron
Reading 0:00
15s threshold

You defined a scheduled task, deployed, and nothing happens. No error, no log line, no email. The scheduler is one of the most frustrating parts of Laravel to debug because it has two separate layers that can fail silently: cron has to start Laravel every minute, and Laravel then decides which tasks are due. Fixing it is mostly a matter of finding out which layer is broken, and that takes three commands.

Everything below was run on Laravel 13.40.0 and PHP 8.3 with a real cron daemon on Debian, not just simulated.

How the scheduler works

Laravel doesn't run its own background process. You add a single cron entry that calls php artisan schedule:run every minute, and Laravel checks which of your tasks are due at that moment. Tasks are defined in routes/console.php (Laravel's docs also allow withSchedule in bootstrap/app.php ).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.