> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nagare.smtdfc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Cron Jobs

> Ask Nagare to automatically perform a task on a recurring schedule.

Cron jobs let Nagare automatically run a request on a schedule, for example "every morning at 9 AM, tell me the weather".

## Create a cron job

You simply tell Nagare in conversation:

```text theme={null}
Every day at 9 AM, tell me the weather in Hanoi.
```

```text theme={null}
Every 30 minutes, check which process is using more than 2 GB of RAM.
```

Nagare uses the `create_cronjob_tool` with three parameters:

| Parameter | Description |
| - | - |
| `name` | Name of the cron job. |
| `action_description` | Description of the task to perform when the schedule triggers. This is an independent request; Nagare will execute it every time the cron job runs. |
| `cron_expr` | Cron expression. |

## Cron expressions

Use the standard 5-field cron format: `minute hour day-of-month month day-of-week`.

| Expression | Meaning |
| - | - |
| `0 9 * * *` | Every day at 9:00. |
| `*/30 * * * *` | Every 30 minutes. |
| `0 8 * * 1` | 8:00 every Monday. |
| `@daily` | Once a day (at midnight). |
| `@hourly` | Once every hour. |

## How cron jobs run

* A cron job is attached to the **chat session** where it was created.
* When the schedule triggers, the gateway sends `action_description` into that session as a system message, with isolated context. The result appears in that same conversation (including Telegram conversations).
* After each run, the next run time is automatically recalculated.

> [!WARNING]
>
> Cron jobs only run while the gateway is running. If the gateway is stopped, restart it with `nagare gateway start`.

If the task involves a tool that requires approval, you still need to approve it on every run. See [Tool Approval](https://docs.nagare.smtdfc.net/en/guides/tools.md#tool-approval).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.