Scheduler Generator Laravel 5.x+
Generate Laravel schedule entries for app/Console/Kernel.php.
What is the Laravel Scheduler Generator?
Laravel ships with a task scheduler that lets you express recurring work in expressive PHP instead of writing raw cron entries. Rather than registering a separate cron job for every task, you register tasks once in routes/console.php using the Schedule facade, and a single system cron entry runs php artisan schedule:run every minute. Laravel then decides which of your tasks are due.
This generator produces the exact code you need to paste into routes/console.php. You choose whether the task is an Artisan command, a queued job, or a closure, enter its name, pick a frequency, and the tool assembles the correct Schedule:: call with the frequency method chained onto it. Optional modifiers such as withoutOverlapping() and runInBackground() can be appended with a single checkbox.
The generator supports the frequencies most projects need, including everyMinute(), everyFiveMinutes(), hourly(), daily(), dailyAt() with a chosen time, weekly(), monthly(), and yearly(), plus the convenience constraints weekdays() and weekends(). For command tasks it emits Schedule::command(), for jobs it emits Schedule::job(new ...), and for closures it emits Schedule::call(function () { ... }).
Everything is generated in the browser and nothing is sent to a server, so the tool is safe for internal class names and command signatures. The output is ready to copy and paste, and you can always adjust the generated chain by hand if you need a more advanced constraint such as between() or timezone().
Key Concepts
- Schedule facade — the
Schedule::API used to register recurring tasks. - routes/console.php — the file where Laravel 12 scheduler tasks are registered.
- Task types — command, job, or call depending on the work to run.
- Frequency methods — chained methods such as
daily()that control timing. - Overlap guard —
withoutOverlapping()stops a task from running while the previous one is still active. - Background running —
runInBackground()lets multiple tasks run at the same time.
How to Use
- Schedule Type — Choose between
command()for Artisan commands,job()for queued jobs, orcall()for callables. - Name your task — Enter the command signature, job class, or function name.
- Set Frequency — Choose how often the task should run (daily, hourly, etc.).
- Optional modifiers — Add withoutOverlapping() or runInBackground() as needed.
- Generate and copy — Click Generate Schedule, then paste the output into
routes/console.php.
Frequency Reference
The generator maps each frequency option to a scheduler method. The table below lists every supported value and when the task will run.
| Option | Method | When it runs |
|---|---|---|
| Every minute | everyMinute() | Once every minute. |
| Every 5 minutes | everyFiveMinutes() | At minutes 0, 5, 10, and so on. |
| Every 15 minutes | everyFifteenMinutes() | At minutes 0, 15, 30, and 45. |
| Every 30 minutes | everyThirtyMinutes() | At minutes 0 and 30 of each hour. |
| Hourly | hourly() | At the top of every hour. |
| Daily | daily() | Once a day at midnight. |
| Daily at time | dailyAt('HH:MM') | Once a day at the chosen time. |
| Weekly | weekly() | Once a week on Sunday at midnight. |
| Monthly | monthly() | On the first day of each month. |
| Yearly | yearly() | Once a year on January 1. |
| Weekdays | weekdays() | Adds a Monday through Friday constraint. |
| Weekends | weekends() | Adds a Saturday and Sunday constraint. |
Worked Examples
- Daily command — command
report:sendwith daily() producesSchedule::command('report:send')->daily();. - Timed command — the same command with dailyAt 08:00 produces
Schedule::command('report:send')->dailyAt('08:00');. - Queued job — a job task produces
Schedule::job(new \App\Jobs\ProcessReports)->daily();. - Closure task — a call task produces
Schedule::call(function () { sendDailyReports(); })->daily();. - Overlap guard — ticking withoutOverlapping() appends
->withoutOverlapping()to the chain. - Background task — ticking runInBackground() appends
->runInBackground()so other tasks can run concurrently.
Tips and Common Mistakes
- Keep the cron entry simple — register one system cron job that runs
php artisan schedule:runevery minute; do not create a cron entry per task. - Paste into the right file — in Laravel 12 tasks belong in
routes/console.php, not in a controller or service. - Use withoutOverlapping for long tasks — it prevents a slow task from starting again before the previous run finishes.
- Do not confuse dailyAt with daily — daily() runs at midnight; dailyAt() requires a time string in 24-hour format.
- Escaping class names — fully qualified job classes need a leading backslash, for example
\App\Jobs\ProcessReports. - Combine constraints with care — weekdays() and weekends() are constraints, so chain them after a base frequency such as daily().
Common Use Cases
The scheduler is the backbone of recurring work in a Laravel application. These are the tasks teams register most often.
- Sending reports — email a daily or weekly summary with a scheduled command.
- Cleaning up data — prune expired records or old logs on a nightly schedule.
- Processing queues — dispatch a job that works through pending records at regular intervals.
- Syncing external data — pull updates from an API every few minutes or hourly.
- Billing and invoicing — generate invoices monthly on a fixed day.
- Health checks — run a closure that pings a service or records a metric every minute.
Frequently Asked Questions
What is Scheduler Generator?
It is a free online tool that builds Laravel task-scheduling code for you. Choose command, job, or call, pick a frequency, and it generates the matching Schedule:: call ready to paste into routes/console.php.
How do I use Scheduler Generator?
Choose a schedule type, enter the command signature, job class, or function name, select a frequency, optionally tick withoutOverlapping() or runInBackground(), and click Generate Schedule. The code appears instantly in the result panel.
Is my data sent to a server or stored?
No. All processing is performed locally in your browser using JavaScript. Your data never leaves your device, is not stored, logged, or shared with any third party. This makes the tool completely safe for handling sensitive information.
Is this tool compatible with the latest Laravel version?
Yes. The generated code targets the modern Laravel 12 scheduler API registered in routes/console.php. Always verify version-specific constraints against your own Laravel documentation.
Is this tool free to use?
Yes. This tool is completely free to use with no limitations, registration, or API key required. There are no usage caps, and you can use it as often as you need.
Where do I paste the generated code?
In Laravel 12, schedule definitions live in routes/console.php. Paste the generated Schedule:: statement there and run php artisan schedule:run through a single system cron entry.
What is the difference between withoutOverlapping and runInBackground?
withoutOverlapping() prevents a task from starting while a previous run is still active, which is useful for long tasks. runInBackground() allows tasks to run concurrently so one slow task does not delay the others.
Can I combine weekdays or weekends with another frequency?
Yes. weekdays() and weekends() are constraints, so chain them after a base frequency such as daily() to limit when the task runs. You can also edit the generated chain to add constraints like between() or timezone().