cronalive/laravel

CronAlive heartbeat monitoring for Laravel: scheduler macros and a ping client

v0.1.2 2026-08-05 18:49 UTC

This package is auto-updated.

Last update: 2026-08-05 20:25:16 UTC


README

Heartbeat monitoring for Laravel scheduled jobs with CronAlive: if a job stops pinging on schedule, you get an alert.

Pings never throw — monitoring must not break the monitored job.

Install

composer require cronalive/laravel

Set the env (only needed for slug addressing / auto-provisioning):

CRONALIVE_PING_DOMAIN=https://ping.cronalive.com
CRONALIVE_PING_KEY=<your project ping key>

Usage

// routes/console.php — by check UUID:
$schedule->command('backup:run')
    ->daily()
    ->pingCronalive('<uuid>');

// by slug with auto-provisioning (the check is created on first ping):
$schedule->command('etl:run')->hourly()->pingCronaliveSlug('etl-run');

// a plain ping outside the scheduler (fire-and-forget, never throws):
use Cronalive\Laravel\Cronalive;

Cronalive::ping('<uuid>');          // success
Cronalive::ping('<uuid>', 'fail');  // explicit failure

Both scheduler macros send /start before the job and success / /fail after it, so CronAlive also measures the job duration.

Docs

Full documentation: https://cronalive.com/en/docs/ (Russian: https://cronalive.com/docs/).

License

MIT