# A daily quest that resets at 4 am

> A quest that comes back every morning, proven by the machine, in a branch of your own.

You want a small quest that comes back each day, after the night is over rather than at midnight.

## Solution

Give the quest `"type": "daily"` and a `reset`, and prove it with a check:

```json [early-round/chart.json]
{
  "id": "round",
  "uid": "early-round.round",
  "act": 1,
  "giver": "operator",
  "type": "daily",
  "reset": { "every": "day", "at": "04:00" },
  "title": { "en": "The morning round", "fr": "La tournée du matin" },
  "reward": { "xp": 20 },
  "steps": [
    {
      "id": "ran",
      "kind": "check",
      "title": {
        "en": "Your automations are running",
        "fr": "Tes automatisations tournent"
      },
      "check": {
        "type": "world",
        "kind": "automation",
        "state": ["running"],
        "min": 1
      }
    }
  ]
}
```

The quest sits in a whole chart: save [the complete file](https://github.com/altasystem-ai/alta/blob/main/examples/recipes/daily/early-round/chart.json) as `early-round/chart.json`, then check the folder.

```sh [Terminal]
alta lint early-round
```

```text [Output]
ok   early-round (chart)
1 checked, 0 errors, 0 warnings
```

## How it works

`reset.at` is a local time, hours and minutes: at 04:00 on the player's clock the quest opens again, whatever time zone they are in (04:00 is also the default when you leave `at` out). A daily quest must be proven by the machine (here, a [world check](https://docs.altasystem.ai/reference/standards/checks#world) that at least one automation runs), because nobody wants to click "I did it" every morning. Its reward counts towards a cap: the daily quests of one branch give at most 60 xp a day together.

That cap is why this quest lives in its own branch, carried by a [chart](https://docs.altasystem.ai/charts/guides/quest-pack): the game's own daily quests already use the 60 xp of the `core` branch, so a daily quest added to `core` is refused with [`branch.daily-xp-cap`](https://docs.altasystem.ai/reference/errors#branch-daily-xp-cap).

## Variants

- **Once a week.** `"reset": { "every": "week", "at": "10:00", "weekday": 7 }` (1 is Monday, 7 is Sunday).
- **Again and again.** A quest the player may redo after a pause is `"type": "repeatable"` with `"repeat": { "cooldownS": 3600 }`.
- **Wrong time.** `"at": "4am"` is refused with [`quest.reset`](https://docs.altasystem.ai/reference/errors#quest-reset): write `"04:00"`.

**Next:**

- [Daily and repeatable quests](https://docs.altasystem.ai/guides/quests/daily-repeatable)
- [Quests standard](https://docs.altasystem.ai/reference/standards/quests)
