# Budget

## `budget`

The most the job may spend, in dollars, across all attempts. Spend is updated
every few minutes while the job runs.

When spend reaches the budget:

1. The job stops with status `stopped`.
2. A `budget` event is recorded.
3. Checkpoints and outputs are kept.

A job is also rejected at submit time, or marked `failed` during recovery, if
no matching machine's estimated cost fits the remaining budget.

## `max_price_hr`

Skip machines above this hourly price per GPU. Useful when you want to rule out
the most expensive GPUs even when they would finish sooner.

## Estimating a budget

```bash
runcompute quote
```

Take the cheapest `est_cost` and add some margin for preemptions and
underestimated work. `1.3×` is a reasonable start.
