Download the PHP package cronpulse/laravel-monitor without Composer

On this page you can find all versions of the php package cronpulse/laravel-monitor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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

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

Configuration

After installation, publish the configuration file:

Add your job key to your .env file:

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

Usage

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

To start monitoring a job:

Marking a Job as Successful

After your job completes successfully:

Marking a Job as Failed

If your job encounters an error and fails:

Sending Heartbeat Pings

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

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

To wrap a job function that should complete successfully:

Example with a Failing Job

To wrap a job function that might fail:

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

Testing

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

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


All versions of laravel-monitor with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^9.0|^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cronpulse/laravel-monitor contains the following files

Loading the files please wait ....