Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers timers

How to enable and implement the Node.js timers API within Cloudflare Workers using the nodejs_compat flag to schedule delayed or repeated function execution.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers timers

How to enable and implement the Node.js timers API within Cloudflare Workers using the nodejs_compat flag to schedule delayed or repeated function execution.

When To Use

Use when you need to schedule delayed function execution, repeat tasks at intervals, or defer execution to the next event loop iteration within a Cloudflare Worker using Node.js compatibility mode.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-runtime-apis-nodejs-timers-workflow-guide.mdDocumentation explaining how to enable and use Node.js timers APIs within Cloudflare Workers using the nodejs_compat compatibility flag.Questions about documentation explaining how to enable and use Node.js timers APIs within Cloudflare Workers using the nodejscompat c...
examples/workers-runtime-apis-nodejs-timers-cloudflare-workers-nodejs-timers.textA JavaScript code example demonstrating the usage of the node:timers module within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the usage of the node:timers module within a Cloudflare Workers environment.
examples/workers-runtime-apis-nodejs-timers-cloudflare-workers-nodejs-timers-2.textA JavaScript code example demonstrating the usage of the node:timers module within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the usage of the node:timers module within a Cloudflare Workers environment.

What This Skill Covers

  • To enable built-in Node.js APIs and polyfills, add the nodejs\compat compatibility flag to your Wrangler configuration file. This also enables nodejs\compat...

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/nodejs/timers