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:

{
"status": "healthy",
"horizon": {"status": "running", "paused": false},
"queues": [{"name": "default", "depth": 5, "status": "ok"}],
"crons": [{"command": "inspire", "last_exit_code": 0, "status": "ok"}],
"alerts": []
}

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

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 or paused), each watched queue (depth against its threshold), and the latest run of each scheduled command (exit code). The alerts array in the JSON output lists whatever is currently firing, so a pipeline can print it 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.