create_function_run
Create a durable function run with idempotency key for reliable scheduling. Supports delayed execution, retries, and expiry to replace ad hoc cron or polling.
Instructions
Create a durable function run with a required idempotency key. Supports immediate, delayed, or run_at scheduling, expiry, retry policy, and optional wait. Use this instead of ad hoc cron/polling when work must survive retries or be redriven.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Function name to run | |
| wait | No | Wait until the run becomes terminal before returning. | |
| delay | No | Delay before first attempt, such as `10m`, `1h`, or `3d`. Mutually exclusive with run_at. | |
| retry | No | ||
| run_at | No | Absolute ISO-8601 first-attempt time. Mutually exclusive with delay/delay_seconds. | |
| payload | No | JSON object payload delivered to the handler | |
| event_type | Yes | Application event type delivered to the function run handler | |
| expires_at | No | Absolute ISO-8601 expiry time. | |
| project_id | Yes | The project ID | |
| timeout_ms | No | Maximum wait time in milliseconds. | |
| delay_seconds | No | Delay before first attempt in seconds. Mutually exclusive with delay and run_at. | |
| expires_after | No | Relative expiry duration, such as `1d`. | |
| idempotency_key | Yes | Required idempotency key. Reuse it when retrying the same logical work item. | |
| poll_interval_ms | No | Polling interval in milliseconds. |