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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-runtime-apis-nodejs-timers-workflow-guide.md | Documentation 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
