cloudflare-cron-triggers

cloudflare-cron-triggers is a skill for Claude Code from secondsky/claude-skills. It costs 38 tokens per session (5,577 once invoked), scanned A, original, MIT.

A guide for running Cloudflare Workers on a schedule using Cron Triggers, which are timed jobs defined with cron expressions.

In plain words
What is it for?
Use it to configure recurring Worker tasks such as hourly jobs and implement the required scheduled handler in TypeScript.
Why use it?
It helps avoid common setup errors involving the scheduled handler, module format, cron syntax, and timezone settings.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the cloudflare-cron-triggers plugin — 1 skill shipped together

Good fit Use it to configure recurring Worker tasks such as hourly jobs and implement the required scheduled handler in TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/secondsky/claude-skills/cloudflare-cron-triggers
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add secondsky/claude-skills --skill cloudflare-cron-triggers
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code.

Or install cloudflare-cron-triggers, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloudflare-cron-triggers

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-cron-triggers/github.svg)](https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-cron-triggers)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-cron-triggers"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-cron-triggers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cloudflare-cron-triggers

Your own site · 80×15
<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-cron-triggers"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-cron-triggers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,577 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.05577
Opus 5 $0.00019 $0.02789
Sonnet 5 $0.00008 $0.01115
Haiku 4.5 $0.00004 $0.00558

Measured 7d ago against content hash 47a2e8414eef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cloudflare-cron-triggers scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (templates/basic-scheduled.ts, templates/hono-with-scheduled.ts, templates/multiple-crons.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl "http://localhost:8787/__scheduled?cron=0+*+*+*+*"
plugins/cloudflare-cron-triggers/skills/cloudflare-cron-triggers/SKILL.md · 845 lines

How it starts

The opening of the file, as written. The whole thing — 845 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cloudflare Cron Triggers

Status: Production Ready ✅ Last Updated: 2025-11-25 Dependencies: cloudflare-worker-base (for Worker setup) Latest Versions: [email protected], @cloudflare/[email protected]


Quick Start (5 Minutes)

1. Add Scheduled Handler to Your Worker

src/index.ts:

export default {
  async scheduled(
    controller: ScheduledController,
    env: Env,
    ctx: ExecutionContext
  ): Promise<void> {
    console.log('Cron job executed at:', new Date(controller.scheduledTime));
    console.log('Triggered by cron:', controller.cron);

    // Your scheduled task logic here
    await doPeriodicTask(env);
  },
};

Why this matters:

  • Handler must be named exactly scheduled (not scheduledHandler or onScheduled)
  • Must be exported in default export object
  • Must use ES modules format (not Service Worker format)

2. Configure Cron Trigger in Wrangler

wrangler.jsonc:

{
  "name": "my-scheduled-worker",
  "main": "src/index.ts",
  "compatibility_date": "2025-10-23",
  "triggers": {
    "crons": [
      "0 * * * *"  // Every hour at minute 0
    ]
  }
}

CRITICAL:

  • Cron expressions use 5 fields: minute hour day-of-month month day-of-week
  • All times are UTC only (no timezone conversion)
  • Changes take up to 15 minutes to propagate globally

3. Test Locally

# Enable scheduled testing
bunx wrangler dev --test-scheduled

# In another terminal, trigger the scheduled handler
curl "http://localhost:8787/__scheduled?cron=0+*+*+*+*"

# View output in wrangler dev terminal

Testing tips:

  • /__scheduled endpoint is only available with --test-scheduled flag
  • Can pass any cron expression in query parameter
  • Python Workers use /cdn-cgi/handler/scheduled instead

4. Deploy

npm run deploy
# or
bunx wrangler deploy

After deployment:

  • Changes may take up to 15 minutes to propagate
  • Check dashboard: Workers & Pages > [Your Worker] > Cron Triggers
  • View past executions in Logs tab

Read the full file on GitHub · 845 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 845 lines · 38 tokens per session scan A 47a2e8414eef

Subscribe to this mod's changes

cloudflare-cron-triggers is a skill published in the GitHub repository secondsky/claude-skills (217 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 5,577 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.