sincecutoff.com
← all changes

wrangler declares Workflow exports in `exports`

Introduced 2026-09-24 · score 0.94

HOW TO USE IT

If a Worker defines a `WorkflowEntrypoint` class, declare it in `exports` under the class name with `type: "workflow"` and a Workflow `name`; add supported settings as needed. Deploy the Worker with Wrangler to upload and provision the Workflow.

{ "exports": { "MyWorkflow": { "type": "workflow", "name": "my-workflow", "limits": { "steps": 100 }, "schedules": "0 * * * *" } } }
npx wrangler deploy

WHY THIS HELPS

Declare and deploy a Workflow defined by a Worker using the exports configuration map.

BEFORE THIS CHANGE

Previously, a Worker could only define a Workflow through a `workflows` binding, even when it never called the Workflow itself.

REQUIREMENTS AND LIMITATIONS

  • Version: 4.139.0
  • exports.MyWorkflow (required): Map key is the exported class name; it must name a class extending `WorkflowEntrypoint`.
  • type (required): Set to `"workflow"`.
  • name (required): Workflow name; unique within the account.
  • limits.steps: Maximum steps a Workflow instance may run.
  • concurrency.limit: Maximum Workflow instances that can run concurrently; documented by the `@cloudflare/config` helper.
  • schedules: Cron schedule or schedules that start Workflow instances automatically.
  • default_retention.success_retention: Retention duration for successful or terminated instances; accepts a duration string or milliseconds.
  • default_retention.error_retention: Retention duration for errored instances; accepts a duration string or milliseconds.
  • Prerequisite: Workflow exports require Wrangler 4.139.0 or above.
  • Prerequisite: For `cloudflare.config.ts`, the documented helper is `exports.workflow({ name, limits, concurrency, schedules, defaultRetention })`; the class name is the map key.
  • A Workflow may be declared both as a binding and as an export if both declarations use the same class and do not set the same setting to different values.
  • A binding to another Worker's Workflow cannot share a name with an export.
  • Local development does not yet act on these entries.
  • Docs conflict: The Wrangler configuration and changelog pages list `limits`, `schedules`, and `default_retention` for Workflow exports, but do not list `concurrency`; the current `@cloudflare/config` helper docs do include `concurrency.limit`. The release note says exports accept the same settings as bindings, including concurrency. Verify the installed Wrangler/config schema before using concurrency in Wrangler JSON/TOML.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card