Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Scheduler

Implements execution delays in Cloudflare Workers using the scheduler.wait() API, including patterns for exponential backoff with jitter and cancellation via AbortSignal.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Scheduler

Implements execution delays in Cloudflare Workers using the scheduler.wait() API, including patterns for exponential backoff with jitter and cancellation via AbortSignal.

When To Use

Use when you need to pause Worker execution for a specific duration, implement retry logic with backoff, or cancel a pending delay using an AbortSignal.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-runtime-apis-scheduler-workflow-guide.mdDocumentation detailing the syntax, parameters, and usage of the Cloudflare Workers scheduler.wait() method.Questions about documentation detailing the syntax, parameters, and usage of the Cloudflare Workers scheduler.wait() method.
examples/workers-runtime-apis-scheduler-cloudflare-workers-scheduler-wait-api-usa.textA text-based demonstration of using the scheduler.wait method with delay and options parameters in the Cloudflare Workers runtime.Exact payloads, commands, or snippets shown in A text-based demonstration of using the scheduler.wait method with delay and options parameters in the Cloudflare Wor...
examples/workers-runtime-apis-scheduler-cloudflare-workers-scheduler-wait.textA JavaScript code example demonstrating the use of the scheduler.wait method to delay a Worker response.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the use of the scheduler.wait method to delay a Worker response.
examples/workers-runtime-apis-scheduler-cloudflare-workers-scheduler-wait-2.textA JavaScript code example demonstrating the use of the scheduler.wait method to delay a Worker response.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the use of the scheduler.wait method to delay a Worker response.
examples/workers-runtime-apis-scheduler-cloudflare-workers-scheduler-fetch-retry-.textA JavaScript implementation of a fetch function with exponential backoff using the Workers Scheduler API.Exact payloads, commands, or snippets shown in A JavaScript implementation of a fetch function with exponential backoff using the Workers Scheduler API.
examples/workers-runtime-apis-scheduler-cloudflare-workers-scheduler-fetch-retry--2.textA JavaScript implementation of an asynchronous fetch function with exponential backoff retry logic for use within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript implementation of an asynchronous fetch function with exponential backoff retry logic for use within a C...
examples/workers-runtime-apis-scheduler-cloudflare-workers-scheduler-wait-abortco.textA JavaScript code example demonstrating how to use the Workers Scheduler API to wait for a specified duration with an AbortController signal.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the Workers Scheduler API to wait for a specified duration with an...
examples/workers-runtime-apis-scheduler-cloudflare-workers-scheduler-wait-abort-s.textA JavaScript code example demonstrating how to use the Workers Scheduler API to wait for a specified duration while using an AbortController signal to cancel the operation.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the Workers Scheduler API to wait for a specified duration while u...

What This Skill Covers

  • The scheduler global provides task scheduling APIs based on the WICG Scheduling APIs proposal ↗. Workers currently implement the scheduler.wait() method.
  • Main sections: Background, Syntax, Parameters, Return value, Examples.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/runtime-apis/scheduler