Docs

Schedules

Run a function on a cron schedule in UTC.

For agents: this page as markdown

Run on a schedule

from klio_compute import schedule

@schedule(when="0 * * * *")
def hourly_report():
    ...
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.

© 2026 Klio