PHPackages                             smitmartijn/laravel-schedule-monitor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. smitmartijn/laravel-schedule-monitor

ActiveLibrary[Queues &amp; Workers](/categories/queues)

smitmartijn/laravel-schedule-monitor
====================================

Monitor Laravel scheduled jobs with heartbeats

1.2.1(9mo ago)00MITPHPPHP ^8.0

Since May 12Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/smitmartijn/laravel-schedule-monitor-app)[ Packagist](https://packagist.org/packages/smitmartijn/laravel-schedule-monitor)[ RSS](/packages/smitmartijn-laravel-schedule-monitor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Laravel Schedule Monitor
========================

[](#laravel-schedule-monitor)

Monitor your Laravel scheduled tasks with automatic heartbeats and receive alerts when jobs fail to run.

**Disclaimer**: I built this for WhatPulse, and don't intend on productizing it beyond my use cases. PRs are welcome, though!

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require smitmartijn/laravel-schedule-monitor
```

After installing the package, publish the configuration file:

```
php artisan vendor:publish --provider="Smitmartijn\ScheduleMonitor\ScheduleMonitorServiceProvider" --tag="config"
```

Configuration
-------------

[](#configuration)

After publishing the configuration file, you'll find it at `config/schedule-monitor.php`. You'll need to set these environment variables in your `.env` file:

```
SCHEDULE_MONITOR_API_URL=https://your-monitor-app.pages.dev
SCHEDULE_MONITOR_API_TOKEN=your-api-token

```

Make sure the API token matches the one you set in your monitoring application.

Usage
-----

[](#usage)

### Syncing Your Scheduled Tasks

[](#syncing-your-scheduled-tasks)

Before the monitoring can begin, you need to sync your scheduled tasks with the monitoring application. Run the following command:

```
php artisan schedule:monitor:sync
```

This will scan all your scheduled tasks and send them to the monitoring application. It's recommended to run this command in your deployment process so that any changes to your scheduled tasks are automatically synced.

### Testing Heartbeats

[](#testing-heartbeats)

You can send a test heartbeat for a job to verify the monitoring connection is working properly:

```
php artisan schedule:monitor:test-heartbeat "php artisan your:command"
```

This will send a test heartbeat for the specified job. The job name should match exactly what appears in the monitoring app after running the sync command.

Options:

- `--status=success|failure` - Set the job status (default: success)
- `--runtime=0.5` - Set a custom runtime in seconds (default: 0.1)

Example:

```
# Test a job with failure status
php artisan schedule:monitor:test-heartbeat "php artisan emails:send" --status=failure
```

### Customizing Monitoring

[](#customizing-monitoring)

By default, all scheduled tasks will be monitored. If you want to exclude specific tasks from monitoring, you can use the `withoutMonitoring` method in your scheduler:

```
// In app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
    // This job will be monitored
    $schedule->command('emails:send')->daily();

    // This job will NOT be monitored
    $schedule->command('horizon:snapshot')
        ->everyFiveMinutes()
        ->withoutMonitoring();
}
```

### Setting Custom Grace Periods

[](#setting-custom-grace-periods)

You can set a custom grace period for individual tasks using the `graceMinutes` method:

```
$schedule->command('import:data')
    ->daily()
    ->graceMinutes(60); // Allow up to 60 minutes delay before marking as missed
```

If not specified, the default grace period from the configuration will be used.

How It Works
------------

[](#how-it-works)

1. When you run the `schedule:monitor:sync` command, all eligible scheduled tasks are sent to the monitoring application.
2. When a task finishes running, the package automatically sends a heartbeat to the monitoring application.
3. The monitoring application checks if tasks are running on schedule and raises alerts when they miss their expected run time.

Monitoring Multiple Applications
--------------------------------

[](#monitoring-multiple-applications)

You can use the same monitoring application for multiple Laravel applications. Each application will need its own API token, and its jobs will be tracked separately.

Troubleshooting
---------------

[](#troubleshooting)

### Heartbeats Not Being Sent

[](#heartbeats-not-being-sent)

Make sure:

1. The Laravel application can reach the monitoring API URL
2. The API tokens match on both sides
3. The scheduled task isn't excluded by the ignore patterns in the config

### Check Connectivity

[](#check-connectivity)

You can test the connection to the monitoring service by running:

```
php artisan schedule:monitor:sync
```

If this command completes successfully, the connection is working.

Security
--------

[](#security)

If you discover any security issues, please use the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~76 days

Total

2

Last Release

289d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a21fee55a7eb0a7b9b3eb2f2904b60e65627041e1c2b515cf59133dc2cccbb5?d=identicon)[smitmartijn](/maintainers/smitmartijn)

---

Top Contributors

[![smitmartijn](https://avatars.githubusercontent.com/u/6500836?v=4)](https://github.com/smitmartijn "smitmartijn (4 commits)")

### Embed Badge

![Health badge](/badges/smitmartijn-laravel-schedule-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/smitmartijn-laravel-schedule-monitor/health.svg)](https://phpackages.com/packages/smitmartijn-laravel-schedule-monitor)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
