Workflows, Workers - Declare Workflows in the `exports` configuration
From the publisher
You can now declare the Workflows a Worker defines in the exports field of your Wrangler configuration file. Previously, a Worker could only define a Workflow through a workflows binding, even when the Worker never called the Workflow itself. Key each entry by the name of the class that extends WorkflowEntrypoint: { "exports": { "MyWorkflow": { "type": "workflow", "name": "my-workflow", "limits": { "steps": 25000, }, "schedules": ["0 * * * *"], }, }, } [exports.MyWorkflow] type = "workflow" name = "my-workflow" schedules = [ "0 * * * *" ] [exports.MyWorkflow.limits] steps = 25_000 A workflow export accepts the same settings as a workflows binding: limits, schedules, and default_retention. When you run wrangler deploy, Wrangler creates or updates the Workflow with these settings. You can declare a Workflow as both a binding and an export.
Source Cloudflare DevelopersCC BY 4.0 · Publisher excerpt shortened and converted to plain text. Original source license applies.
Read full article

