Laravel theorytheory 0/50 · 0%
Async · medium

22. Task Scheduling

Cron without editing crontab.

Laravel's scheduler lets you fluently define command schedules within the application itself, defined in routes/console.php (Laravel 11+) using Schedule::command() or Schedule::call(). A single cron entry (* * * * * php artisan schedule:run) triggers Laravel to evaluate which scheduled tasks are due. Methods like ->daily(), ->hourly(), and ->cron() control frequency.

Check your understanding

  1. 1. How many crontab entries does Laravel's scheduler require?

  2. 2. Where are scheduled tasks defined in Laravel 11?