Laravel Task Scheduling set to run every minute but it run only once

Stefan Bogdanescu

Founder & Senior Architect · 2026-06-29

Laravel Company
# Laravel Task Scheduling: Why Your `everyMinute()` Task Runs Only Once As a senior developer working with PHP frameworks, we frequently encounter scenarios where scheduled tasks seem to operate inconsistently. One common frustration arises when setting up recurring jobs using Laravel's Task Scheduling feature—defining them to run `everyMinute()`, but observing that they only execute once, regardless of the time elapsed. This post will diagnose why this happens and provide the definitive solution for ensuring your Laravel scheduled tasks run reliably every minute. ## The Misconception: Schedule Definition vs. Execution Trigger The core misunderstanding often lies in confusing *defining* a schedule with *triggering* that schedule. When you use the Artisan command `$schedule->command('dailyk')->everyMinute();`, you are merely telling Laravel’s internal scheduler **what** tasks need to be run and **how often** they should be considered for execution. You have defined the intent, but you have not yet established the external mechanism that forces Laravel to execute those definitions repeatedly in real-time. Laravel itself is an application layer; it does not inherently manage operating system time-based triggers. For recurring tasks, the actual execution must be delegated to the underlying operating system's scheduler: **Cron**. When you run `php artisan schedule:run`, you are telling Laravel: "Check your defined schedule and run anything due *right now*." If this command is executed only once (perhaps manually via a single cron entry), it will only process tasks that were queued up at the moment the command was executed, not continuously monitor for new execution windows. ## The Solution: Leveraging Cron for Continuous Execution To achieve true "every minute" execution, you must configure your server’s Cron job to execute the Laravel scheduler command repeatedly every 60 seconds. This external trigger ensures that the Laravel application is periodically polled by the operating system to see if any scheduled tasks are due. ### Step 1: Ensure Your Laravel Setup is Correct First, ensure your setup follows best practices. When defining schedules, always use relative time definitions when possible, although `everyMinute()` is perfectly valid for this scenario. **Example Schedule Definition:** ```php // In your Command or Console file $schedule->command('dailyk')->everyMinute(); ``` ### Step 2: Configure the System Cron Job (The Crucial Step) You need to set up a cron entry on your server that executes `php artisan schedule:run` every minute. This is what forces Laravel to check its queue at regular intervals. Open your crontab file by running `crontab -e` and add the following line: ```cron * * * * * /usr/bin/php /path/to/your/project/artisan schedule:run > /dev/null 2>&1 ``` **Explanation of the Cron Entry:** * `* * * * *`: This means "every minute of every hour, every day, every month, and every day of the week." * `/usr/bin/php`: Ensure this is the absolute path to your PHP executable. * `/path/to/your/project/artisan schedule:run`: This is the command Laravel needs to run. * `> /dev/null 2>&1`: This redirects all output (both standard output and errors) to null, keeping your system logs clean unless an actual error occurs. By setting this up, the operating system will invoke PHP and execute the scheduler check every sixty seconds, allowing Laravel to pick up and run any tasks marked with `everyMinute()`. This pattern is fundamental to reliable background processing in any robust application built on frameworks like Laravel, as detailed by principles found within the documentation at [https://laravelcompany.com](https://laravelcompany.com). ## Conclusion: Reliability Through External Triggers The issue you encountered is not a bug in your Laravel scheduling logic, but rather a gap between defining a schedule and implementing an external execution trigger. In the world of task scheduling, remember this golden rule: **The framework defines *what* to run; the operating system (Cron) dictates *when* it runs.** By correctly setting up the cron job to poll the `schedule:run` command every minute, you establish a robust and reliable mechanism for executing recurring tasks. This approach ensures that your background jobs operate consistently, making your application much more predictable and dependable.