Skip to main content

Configuration

Define cron schedules directly in your function’s config. No external configuration needed.
index.ts

Local testing

Start the server with jelou functions dev. You can send an HTTP request to the function, but the isCron guard will reject it because it is not a real cron trigger:
You cannot simulate a real cron trigger from curl — the platform injects ctx.isCron and the cryptographic signature automatically. To test cron logic, use createMockContext({ isCron: true }) in your tests.

Syntax

Each schedule has two fields:

Expression format

Common examples

Timezones

Use any valid IANA zone:

isCron guard

Your function can receive both HTTP requests and cron triggers. Use ctx.isCron to distinguish them:
Without the isCron guard, any HTTP request to your function will execute the cron logic. Always include this check.

How it works

  1. You define the schedules in config.cron
  2. When you run jelou functions deploy, the platform reads your configuration and creates the schedules
  3. When a schedule fires, your function receives a request with ctx.isCron === true and ctx.trigger.cron with the expression that triggered it
  4. Cryptographic signature verification prevents unauthorized invocations

Limits

  • Maximum 10 cron schedules per function
  • Exceeding this limit throws an error at definition time

Management

Schedules are declarative — they are defined in code and synchronized on each deployment. To modify a schedule, change config.cron in your code and redeploy. To view active schedules:

Multi-tool cron

When you use app(), each tool can have its own independent cron schedules. Cron requests are sent to the specific route of each tool.
The 10 cron schedule limit is aggregated across all tools in an app(). If one tool uses 6 schedules, the other tools can only use 4 in total.

Common issues

Cron schedules are synchronized on deploy. If you changed the cron expression, you need to redeploy:
Verify that the schedule is active:
If the Enabled column shows no, check that the cron expression is valid.
See the full multi-tool guide for more details about app().