---
title: Check-ins
description: Monitor scheduled tasks and background jobs with Honeybadger Check-Ins for JavaScript.
url: https://docs.honeybadger.io/lib/javascript/guides/check-ins/
---

## Usage

Note

Check-Ins are only available for JavaScript running on the server.

The Honeybadger JavaScript client comes with a helper method `checkIn()`, that allows to *ping* Honeybadger from inside the code. You can read more about check-ins [here](https://docs.honeybadger.io/lib/javascript/guides/check-ins/).

Usage is pretty simple:

```javascript
await Honeybadger.checkIn("Slug_or_ID");
```

## Configuration

Honeybadger’s JavaScript packages allow configuring [Check-Ins](https://www.honeybadger.io/check-ins) via a configuration file. Simply add a `honeybadger.config.js` or `honeybadger.config.ts` in your project’s root folder.

Here’s a sample configuration file:

honeybadger.config.js

```javascript
module.exports = {
  apiKey: process.env.HONEYBADGER_API_KEY,
  personalAuthToken: process.env.HONEYBADGER_PERSONAL_AUTH_TOKEN,
  checkins: [
    {
      scheduleType: "simple",
      name: "Hourly clean up",
      slug: "hourly-clean-up",
      gracePeriod: "5 minutes",
      reportPeriod: "1 hour",
    },
    {
      scheduleType: "cron",
      name: "Hourly check",
      slug: "hourly-check",
      cronSchedule: "30 * * * *",
      cronTimezone: "UTC",
    },
  ],
};
```

## Prerequisites

Note

Check-ins are project specific, so you need to set the `apiKey` of the project you want to create check-ins for. A `personalAuthToken` is required to create, update or remove check-ins. You can find this token under the [authentication tab in your User Settings page](https://app.honeybadger.io/users/edit#authentication).

## Check-in options

| Field name     | Required                                                   |
| -------------- | ---------------------------------------------------------- |
| `name`         | No.                                                        |
| `slug`         | Yes. This is the identifier used to synchronize check-ins. |
| `scheduleType` | Yes.                                                       |
| `reportPeriod` | Only when `scheduleType: 'simple'`.                        |
| `cronSchedule` | Only when `scheduleType: 'cron'`.                          |
| `cronTimezone` | Only when `scheduleType: 'cron'`.                          |
| `gracePeriod`  | No.                                                        |

You can find more details in the [Check-Ins API](https://docs.honeybadger.io/api/check-ins/) page.

## Synchronization

Once you have configured your check-ins, they need to be synchronized with Honeybadger. Usually you would do this as part of your deployment pipeline.

Simply add the following command to your deployment pipeline:

```bash
npx honeybadger-checkins-sync
```

The output of the command will print out created, updated or removed check-ins:

```shell
$ npx honeybadger-checkins-sync
Checkins were synchronized with Honeybadger.
┌─────────┬──────────┬─────────────────────────────────────────┬───────────────┬───────────────┬──────────────┬───────────────────┐
│ (index) │    Id    │                  Name                   │ Schedule Type │ Report Period │ Grace Period │      Status       │
├─────────┼──────────┼─────────────────────────────────────────┼───────────────┼───────────────┼──────────────┼───────────────────┤
│    0    │ 'yaI6Pr' │            'Weekly Exports'             │   'simple'    │   '1 week'    │ '10 minutes' │ '✅ Synchronized' │
│    1    │ '83Id8v' │         'Hourly Notifications'          │   'simple'    │   '1 hour'    │ '5 minutes'  │ '✅ Synchronized' │
│    3    │ 'l2Ie8Q' │ 'Hourly SMS Notifications (deprecated)' │   'simple'    │   '1 hour'    │ '5 minutes'  │   '❌ Removed'    │
└─────────┴──────────┴─────────────────────────────────────────┴───────────────┴───────────────┴──────────────┴───────────────────┘
```

### Validation

The synchronization process will validate the check-ins before sending them to Honeybadger. If any of the check-ins are invalid, the synchronization will fail and most probably the deployment pipeline will fail. If you want to avoid this behavior, you can ignore the result of the command:

```bash
npx honeybadger-checkins-sync || true
```

## Troubleshooting

If you are receiving invalid API key errors, make sure you have set both `apiKey` and `personalAuthToken` in your configuration file. If you are still receiving errors, it is possible that you have reached your check-in limit or you are trying to create a check-in that is not supported by your plan.

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
