Skip to content

CLI Health Check

Terminal window
php artisan crontinel:check

Prints a table of all monitor statuses and exits:

  • 0 – all monitors healthy
  • 1 – one or more alerts active

JSON output

Terminal window
php artisan crontinel:check --format=json

Returns an object with four keys:

  • horizon: the Horizon status, or null when Horizon monitoring is off
  • missing_supervisors: configured Horizon supervisors that are not running
  • queues: one entry per watched queue
  • crons: one entry per scheduled command

The exit code is the same as the table output. There is no overall status key; use the exit code.

CI/CD usage

# GitHub Actions
- name: Check job health
run: php artisan crontinel:check --format=json
Terminal window
# Deploy script
php artisan crontinel:check || echo "Warning: monitors unhealthy after deploy"

No-alert mode

By default the command also evaluates and sends local alerts. Run the check without firing alerts (useful for health endpoints):

Terminal window
php artisan crontinel:check --no-alerts

What the check covers

The command reads the same three monitors as the dashboard: Horizon (running, paused, failed jobs per minute, missing supervisors), each watched queue (depth against its threshold), and the latest run of each scheduled command (exit code, late). A pipeline can print the JSON output when the exit code is 1.

crontinel:check ships with the Laravel package and needs php artisan. If your job runs in another runtime, use an HTTP check-in and register the schedule instead; the hosted app does the alerting.