---
title: Crons
description: Scheduled HTTP requests, run on a cron schedule inside your project.
---

## Introduction

A cron is a scheduled task that Futrou triggers for you on a recurring schedule — you don't run a process or keep anything online yourself. Each cron belongs to a project, runs in a **region**, and is billed on its own **plan**, the same shape as a serverlet or a volume.

A cron has a **type** that determines what it does when it fires:

- **Simple (HTTP)** — makes an HTTP request to a URL you specify, with a chosen method, headers, and body. This is the type used for scheduled pings, webhooks, and cache-warming requests against your own serverlets or any other endpoint.
- **Code (JS)** — runs a short JavaScript snippet instead of calling a URL.

At any given schedule tick, Futrou executes the cron according to its type and records the result.

## Schedule

A cron's schedule is a standard 5-field crontab expression: `minute hour day month weekday`, for example `0 * * * *` for "once every hour, on the hour." Wildcards (`*`), ranges (`1-5`), lists (`1,3,5`), and step values (`*/5`) are all supported in each field, following normal crontab syntax.

The minimum interval is once per minute — a step value of less than `1` in the minute field (e.g. `*/0`) is rejected, so a cron can't be scheduled to run more often than every 60 seconds.

## Plans

Every cron runs on a **cron plan** — a billing tier, the same concept as a [serverlet plan](/docs/serverlet/#plans). If you don't choose one explicitly, your cron is created on the default public plan. Pricing is shown per minute and as an estimated monthly cost in the dashboard before you confirm.

## Region

A cron runs in a specific **region**, or you can leave it on **Auto** and let Futrou assign one automatically.

## Creating a cron

Creating a cron takes a name, a schedule, and the fields for its type:

- **Name** — used in the dashboard.
- **Schedule** — the crontab expression described above.
- **Type** — `simple` (HTTP) or `code`.
- For a **Simple** cron: an HTTP **Method** and a **URL** to call. Headers and a request body are optional.
- For a **Code** cron: the JavaScript **Code** to execute.
- **Enabled** — whether the cron actually fires on its schedule; a disabled cron keeps its configuration but doesn't run.

## Testing a cron

Before saving a cron, you can run it once immediately with `POST /crons/test` to see how it behaves without creating anything or affecting the schedule. The test endpoint validates the same fields as creating a cron, executes it immediately, and returns the outcome — status, output, duration, and start/finish timestamps — without persisting the cron. Test requests are rate-limited per IP to prevent accidental hammering of the target URL.

## Updating and deleting

A cron's name, schedule, type, target fields, region, and enabled state can all be changed after creation with `PATCH /crons/:cronId`. Deleting a cron with `DELETE /crons/:cronId` stops it from running and removes it entirely.

## Relation to projects and serverlets

Crons are scoped to a project like any other Futrou service, and are commonly used to periodically call a serverlet in the same project — for example, hitting a `/cron` or `/cleanup` endpoint on a schedule. A cron isn't tied to a specific serverlet at creation time; it just calls whatever URL and method you configure, which can point at a serverlet's public address, an internal endpoint, or any external URL.