PHPackages                             cronpulse/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cronpulse/laravel-monitor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cronpulse/laravel-monitor
=========================

A cronjob monitoring library for Laravel using Cronpulse.live

v1.0.0(1y ago)09PHPPHP ^8.0

Since Aug 10Pushed 1y ago2 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

Cronpulse Laravel Monitor
=========================

[](#cronpulse-laravel-monitor)

Cronpulse Laravel Monitor is a monitoring library for Laravel applications that allows you to easily send heartbeat pings, start/stop job pings, and wrap jobs for monitoring. This helps ensure your scheduled tasks are running as expected and provides insights into job failures or successes.

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

[](#installation)

To install the package, add it to your Laravel project's `composer.json` and run `composer update`:

```
composer require cronpulse/laravel-monitor
```

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

[](#configuration)

After installation, publish the configuration file:

```
php artisan vendor:publish --provider="Cronpulse\\LaravelMonitor\\MonitorServiceProvider"
```

Add your job key to your `.env` file:

```
MONITOR_JOB_KEY=your-real-job-key
```

This job key is essential for authenticating your pings with cronpulse.

Usage
-----

[](#usage)

### Basic Monitoring

[](#basic-monitoring)

You can manually ping cronpulse by using the `Monitor` class. This can be useful for sending status updates about your scheduled jobs.

#### Starting a Job

[](#starting-a-job)

To start monitoring a job:

```
use Cronpulse\LaravelMonitor\Monitor;

$monitor = new Monitor();
$monitor->ping('start');
```

#### Marking a Job as Successful

[](#marking-a-job-as-successful)

After your job completes successfully:

```
$monitor->ping('success');
```

#### Marking a Job as Failed

[](#marking-a-job-as-failed)

If your job encounters an error and fails:

```
$dynamicError = 'This is a dynamic error message';
$monitor->ping(['state' => 'fail', 'message' => $dynamicError]);
```

#### Sending Heartbeat Pings

[](#sending-heartbeat-pings)

You can also send heartbeat pings to monitor the regular execution of a task:

```
$monitor->ping('beat');
```

### Wrapping a Job

[](#wrapping-a-job)

The `wrap` function provides a convenient way to monitor a job's start and completion, including error handling.

#### Example with a Successful Job

[](#example-with-a-successful-job)

To wrap a job function that should complete successfully:

```
use function Cronpulse\LaravelMonitor\wrap;

wrap('your-job-key', function() {
    // Your job logic here
    return true;
});
```

#### Example with a Failing Job

[](#example-with-a-failing-job)

To wrap a job function that might fail:

```
wrap('your-job-key', function() {
    // Simulate job failure
    throw new \Exception('Something went wrong');
});
```

The `wrap` function will automatically handle sending pings for the job start, success, or failure.

Testing
-------

[](#testing)

The library includes tests to ensure its functionality. You can run the tests using Laravel’s test runner:

```
php artisan test
```

Ensure that your `.env` file contains the correct `MONITOR_JOB_KEY` for the tests to run against your monitoring service.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

641d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff137c0ae8745c61f0114c520e6e981e1eb9b1552353a619cb19b190cb9f5eb5?d=identicon)[cronpulse](/maintainers/cronpulse)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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