Actions
Actions schedule work without requiring you to run a scheduler. An action can run recurring work on a cron schedule or one-time work at a set time. Each time it runs, Forte sends an HTTP POST to a path on one of your Services and records the result as an invocation.
Create actions from the console, the forte actions CLI, or the server-side API. From code, you can schedule work dynamically. For example, create a one-time action at sign-up to send a follow-up one day later.
Common uses include nightly jobs, reminders, periodic syncs, cache warming, and scheduled reports.
How it works
You register an action with a target service and path (much like a payment trigger), an optional request body, and a schedule. The target service must belong to the same project. Forte calls that path on that schedule and keeps a history of every call. You manage actions from your backend (the server-side forte.projects.* API with FORTE_API_TOKEN), the forte actions CLI, or the console — they belong to the project, not to a signed-in end user.
Schedule types
| Type | When it runs | Required fields |
|---|---|---|
| Recurring | Repeatedly, on a cron schedule evaluated in a timezone you choose, optionally bounded by a start/end window | cronExpression, timezone |
| One-time | Once, at a single future timestamp | scheduledAt |
- Timezone is an IANA identifier such as
America/New_York, so Forte handles daylight-saving transitions for you. - Active window (recurring only) — optionally restrict a recurring schedule to a start and/or end time. Outside the window, nothing fires. A start time in the past does not backfill missed runs — the schedule becomes active and the next run is the next matching time.
- Cadence limit — an action runs at most once per minute. Forte rejects schedules that would invoke actions more often than minutely.
The request Forte sends
Every invocation is an HTTP POST to the path on the target service, with the request body you configured. Forte adds these headers:
| Header | Purpose |
|---|---|
X-Forte-Action-Id | The action that fired. |
X-Forte-Action-Invocation-Id | This specific invocation — use it to make your handler idempotent. |
X-Forte-Trusted | Set to 1 to prove the request genuinely came from Forte. |
Forte strips X-Forte-* headers from any inbound request it doesn't originate, so the presence of X-Forte-Trusted: 1 proves the call came from Forte. Verify it in your handler before acting — this is the same mechanism payment triggers use.
Design your handler to be idempotent on the invocation ID and to return a 2xx quickly. Do slow work in the background.
Scale
Each invocation is a standard HTTP POST to your Service, so you don't need a special runtime. Your service autoscales to handle concurrent requests, then scales down after they finish.
Retries
Mark an action retryable and Forte automatically retries a failed delivery — a non-2xx response, a timeout, or a connection error — on its internal retry policy. Forte attempts a non-retryable action once.
Forte records a failure of your endpoint on the invocation as a failed delivery, not a problem with Forte.
Invocations
Forte records each run of an action as an invocation you can list and inspect, with its status, number of attempts, the response code your endpoint returned, and timing.
| Status | Meaning |
|---|---|
PENDING / RUNNING / RETRYING | Scheduled, in progress, or waiting to retry. |
SUCCEEDED | Your endpoint returned a 2xx. |
FAILED | Your endpoint errored after all attempts. |
CANCELLED | You cancelled the invocation before it ran. |
MISSED | Forte did not run a scheduled occurrence on time. |
You can also:
- Invoke now — trigger an on-demand invocation to test your endpoint immediately.
- Cancel — cancel a still-pending invocation.
- Pause / resume — pause an action to stop its schedule without deleting it, then resume it later.
Quotas
During beta, each project has a limit on the number of enabled actions. Pause or delete actions you no longer need to stay under the limit.