Is there a way to check if Laravel schedule is running?

Stefan Bogdanescu

Founder & Senior Architect · 2026-06-29

Laravel Company
# Is There a Way to Check If Laravel Schedule Is Running? A Developer's Guide When you are maintaining multiple instances of an application, especially those built on Laravel, ensuring that scheduled tasks—the heart of recurring jobs—are executing correctly across all hosts is critical. Simply having the `schedule:run` command configured in your `app/Console/Kernel.php` file isn't enough; you need to verify that the underlying system (Cron) and the application workers are actually performing the work. As a senior developer, I’ve seen this scenario frequently. The complexity arises because Laravel scheduling is decoupled: it relies on the operating system scheduler (Cron) to trigger PHP execution, and then the PHP process must successfully execute the Artisan commands. This guide will walk you through the most reliable methods for checking the operational status of your Laravel schedule across different servers. --- ## Understanding How Laravel Scheduling Works Before diving into diagnostics, it’s important to understand the mechanism. Laravel's scheduler doesn't run tasks directly; it sets up entries in the host system's cron table. For a job defined in `Kernel.php` to execute, the operating system must periodically invoke the PHP CLI interpreter to run the Artisan command (e.g., `php artisan schedule:run`). If your setup involves queue workers (which is highly recommended for heavy jobs), you also need to check if those dedicated worker processes are active on the server. ## Method 1: Verifying the Cron Configuration (The Setup Check) The first step is to confirm that the system *expects* the task to run. This check is done on the host machine itself, not within the Laravel application code. On a Linux-based server, you can inspect the crontab files to see what commands are scheduled: ```bash # Check the user's cron jobs (often the web server user) crontab -l # Check the system-wide cron directories for potential entries ls /etc/cron.d/ ``` **What to look for:** Ensure that the entry pointing to your Laravel application is correctly configured and hasn't been accidentally removed or corrupted on the target host. This confirms the *intent* of scheduling, but not necessarily the *execution*. ## Method 2: Checking the Process Status (The Operational Check) This is the most critical step for verifying if the schedule is *actually running*. You need to confirm that the PHP process responsible for executing these tasks is alive and healthy. ### Checking Cron Execution If you are relying purely on Cron, you can check the system logs: ```bash # Check system logs for cron activity (varies by distribution) grep CRON /var/log/syslog ``` ### Checking Queue Workers (The Deeper Dive) For applications using queues (which often handle scheduled tasks via Horizon or Supervisor), checking the worker status is more informative: ```bash # If using Supervisor to manage workers: sudo supervisorctl status laravel_worker_name ``` If you are using Laravel Horizon, you can check the dashboard, but for raw system checks, monitoring the PHP-FPM or CLI processes is useful. A successful run of scheduled tasks should result in activity within your application’s logs. ## Method 3: Analyzing Application Logs (The Result Check) The ultimate confirmation that a schedule ran successfully comes from the application itself. After confirming the external system is set up correctly, check the Laravel logs on each host to see if the execution completed without errors: ```bash tail -f /path/to/your/application/storage/logs/laravel.log ``` Look for entries corresponding to your scheduled tasks. If a job fails due to a missing dependency, a database connection error, or a bug in the queued class, the log file will contain the stack trace, immediately telling you *why* the schedule isn't working correctly on that specific host. This process of monitoring logs is fundamental to robust application management, following best practices outlined by developers focusing on scalable architecture like those promoted by [laravelcompany.com](https://laravelcompany.com). ## Conclusion: A Multi-Host Strategy There is no single "magic button" in Laravel to check the schedule status across multiple hosts simultaneously. Instead, a robust strategy involves layered verification: 1. **Configuration Check (Cron):** Verify the system setup on each host matches expectations. 2. **Process Check (System Monitoring):** Ensure the underlying PHP processes and queue workers are active. 3. **Result Check (Logging):** Inspect application logs to confirm that the scheduled commands executed successfully and without exceptions. By combining these three methods, you move beyond simply checking if a file exists and ensure operational integrity across your entire deployment landscape.