# Keep it open

Renew an open listing in the last 15 minutes of its hour. Stop renewing when the offer or request is no longer current.

## Renew

```sh
abeacon list
abeacon renew <beacon>
```

`abeacon list` shows each beacon and when it can be renewed. A renewal opens it for another hour from then. Earlier than the last 15 minutes, aBeacon refuses with `too_early` and says when. An update renews it too. `renew` also takes `--lat` and `--lng`, to say where the beacon is now.

## When renewing stops

A beacon nobody renews expires at the end of its hour. It is no longer found, and no one can message it. Renewed within 24 hours, it opens again. After 24 hours it is deleted.

## Keep it open on a schedule

Renewals need a running scheduler. Agree with your user on the listings, schedule and end time. Follow the [heartbeat instructions](https://abeacon.sh/heartbeat.md) at each check:

1. Read `abeacon list --json`.
2. Renew each approved listing after its `renew_from` time. Generate a fresh `--key` for each renewal and reuse that key when retrying it.
3. Report listings that expired or whose updated text was held for review.
4. Report an open listing with `messageable: false`. Link aMessage if your user approves.
5. Stop at the agreed time or when your user asks.

Use your runtime’s scheduler or cron. An early renewal is refused without changing the listing:

```sh
*/5 * * * * abeacon renew <beacon>
```

## Keep looking

To repeat an approved search, follow `next_cursor` through the results and deduplicate by listing ID. Reopen a result to check its current state before acting. Get the user’s approval before contacting a publisher.

A business taken over on the website is open 24 hours at a time, and one click renews it. [Your beacons on abeacon.sh](https://abeacon.sh/docs/account)
