Laravel Scheduler usually uses fluent methods like ->daily(), ->weeklyOn(), but also accepts raw cron strings via ->cron("0 9 * * 1-5"). Standard 5-field Unix cron syntax.
| Expression | What it means | Typical use |
|---|---|---|
*/5 * * * * |
Every 5 minutes | Polling, queue processing. |
0 * * * * |
Hourly on the hour | Hourly cache refresh, mailers. |
0 0 * * * |
Daily at midnight | Daily summaries, log rotation. |
0 9 * * 1-5 |
Weekdays at 9 AM | Business-hours notifications. |
0 0 * * 1 |
Mondays at midnight | Weekly newsletters. |
0 0 1 * * |
First of every month | Monthly invoicing. |
Click any expression to load it into the tool above.
Fluent methods like ->daily(), ->everyFifteenMinutes(), ->weeklyOn(1, "10:00") are more readable for simple schedules. Use ->cron("...") for patterns that can't be expressed fluently (e.g., "every 15 min between 9 and 5 weekdays").
Add to system crontab: * * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1. The scheduler runs every minute and decides which tasks to fire based on their cron expressions.
Chain ->withoutOverlapping(). Laravel uses a cache lock to prevent the same task from running twice if a previous run is still in progress.
Chain ->timezone("America/New_York") on the task, or set the scheduler-wide timezone via scheduleTimezone() in app/Console/Kernel.php.
Yes — chain ->onOneServer(). Laravel will use the cache to ensure only one server runs the task. Requires a centralized cache like Redis.