# Schedules

> Run a function on a cron schedule in UTC.

Canonical page: https://klio.tech/docs/schedules

## Run on a schedule

```python
from klio_compute import schedule

@schedule(when="0 * * * *")
def hourly_report():
    ...
```

```bash
klio deploy app.py:hourly_report
```

`when` is a cron expression in UTC, to the minute. `@hourly`, `@daily`, `@weekly`, `@monthly` and `@yearly` work too. The schedule runs once it is deployed, and each run is billed like any other container.

With the Modal-compatible API, `modal.Cron` and `modal.Period` work. A `Cron` in another time zone starts a short container often enough to check its local clock, and that time is billed.
