# Job

Background work: syncs, backups, migrations, scheduled runs.

Pattern: `job.*` (this page) · Written with: [`log()`](https://www.prongs.dev/docs/profiles/logs.md) · Intents: [2](#intents) · Levels: `info`

## Intents

| Intent | Status | Use it for |
|---|---|---|
| [`job.started`](https://www.prongs.dev/docs/intents/job/started.md) | `info` | A background job or script began: a sync, a backup, a migration |
| [`job.finished`](https://www.prongs.dev/docs/intents/job/finished.md) | `info` | A job ended, with what it did: counts, duration |

## Recording one

Name what happened. The intent sets the level and whether it alerts.

```ts
// A background job or script began: a sync, a backup, a migration
log('job.started', 'Redirect sync started', { site: 'main' });

// A job ended, with what it did: counts, duration
log('job.finished', 'Redirects synced', { count: 40, tookMs: 1830 });
```

Writes (job.started)

```ts
{
  "intent": "job.started",
  "level": "info",
  "alert": false,
  "message": "Redirect sync started",
  "data": {
    "site": "main"
  },
  "time": "2026-10-09T12:00:00.000Z"
}
```

## Is it a job entry?

Find the row that describes your case, and use the domain on the right.

| If the problem is | Use |
|---|---|
| Who did what, kept as a record: things created, changed, deleted, and changes to access. | [`audit.*`](https://www.prongs.dev/docs/intents/audit.md) |
| Signals worth watching: failed sign-ins, bad tokens, rate limits, probing. | [`security.*`](https://www.prongs.dev/docs/intents/security.md) |
| Something broke or degraded, and someone should look. | [`incident.*`](https://www.prongs.dev/docs/intents/incident.md) |
| Background work: syncs, backups, migrations, scheduled runs. | `job.*` (this page) |
| Detail for working on the code, dropped in production. | [`debug.*`](https://www.prongs.dev/docs/intents/debug.md) |

## For registry authors

**Starter intents.** These are the intents `prongs add logs` puts in your registry. Change levels through the [`level.*`](https://www.prongs.dev/docs/intents/logs.md#level) intents, and point [`log()`](https://www.prongs.dev/docs/profiles/logs.md) at your logger.
