> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laravelify.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Heartbeats

> Know when a cron job or scheduled task stops running.

A heartbeat is a URL your job calls when it finishes. If no call arrives within the expected interval (plus 2 minutes of grace), Laravelify sends a Telegram alert, and another one when the job reports again.

## Add one

Website → **Monitoring** → **Heartbeats** → name it and pick how often it runs (every minute to weekly). Copy its command:

```bash theme={null}
curl -fsS https://panel.example.com/hooks/heartbeat/AbC123…
```

## Call it

<CodeGroup>
  ```bash crontab theme={null}
  0 3 * * * /usr/bin/php /var/www/myapp/artisan backup:run && curl -fsS https://panel.example.com/hooks/heartbeat/AbC123…
  ```

  ```php Laravel scheduler theme={null}
  Schedule::command('backup:run')
      ->daily()
      ->pingOnSuccess('https://panel.example.com/hooks/heartbeat/AbC123…');
  ```

  ```bash Any script theme={null}
  ./nightly-export.sh && curl -fsS --retry 3 https://panel.example.com/hooks/heartbeat/AbC123…
  ```
</CodeGroup>

## States

| State | Meaning |
| - | - |
| Waiting | Created, no ping yet |
| On time | Pinged within the interval |
| Missed | No ping within interval + grace; one alert was sent |

<Note>
  The URL needs no login so cron can call it. The token is 40 random characters; anyone with the URL can mark the job alive, so keep it private. Calls are limited to 60 a minute.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.