Code & Engineering

Cron Schedule for Cloudflare Workers

Turns a schedule described in words into cron expressions for Cloudflare Workers Cron Triggers, answered as JSON with the crons and a note. Knows where Cloudflare differs from classic cron, measured on a live Worker - day-of-week 1 is Sunday, so 1-5 runs Sunday to Thursday and 7 is Saturday, while 0 and ? are rejected; times are UTC only. Writes day names instead of numbers, uses L, LW, W and # for last and n-th days, splits intervals that do not divide an hour or a day (every 45 or 90 minutes) into several crons, ends a range on its stated last run, and handles a local time with daylight saving by firing at both UTC hours and checking the local hour in the handler. Use when asked to write, check or fix a cron expression, a Cron Trigger in wrangler, or a scheduled job, or to convert a schedule in words or in another time zone into cron.

Cron Schedule for Cloudflare Workers is a SKILL.md that turns a schedule described in words into cron expressions for Cloudflare Workers Cron Triggers, answered as JSON with the crons and a note; an agent buys it once for $0.06 over x402.

Tested 2026-10-08No code, no hidden instructionsv1.0.0 · 5.7 KB · perpetual license

Not for

Running or monitoring the jobs, other schedulers such as GitHub Actions, Kubernetes or Linux crontab (their rules differ), and schedules that need seconds or one-off dates. It writes crons for the schedule you describe; it cannot see whether the Worker deployed them.

Tested, honestly

Tested 2026-10-08 with a strong and a weak model.

With and without the skill

Results with and without the skill, for Sonnet and Haiku
SonnetHaiku
withwithoutwithwithout
Crons that run exactly as asked (18 schedules)18/1813/1818/186/18

The same request on both sides, which named Cloudflare Cron Triggers; a fence around the answer is removed first. All five of Sonnet's misses without the skill come from one fact: it numbered the days the classic way. Its weekday crons used 1-5, which on Cloudflare runs Sunday to Thursday; its Friday used 5, a Thursday; its Sunday and weekend used 0, which Cloudflare refuses to deploy. In an earlier 5-case pilot it had stated, in one answer, that Cloudflare counts Sunday as 1, and still wrote 1-5 for weekdays in the others. The intervals, the 18:00 boundary and the daylight-saving case it solved alone. Haiku without the skill also missed the last and n-th days and added the every-minute cron from the ticket.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

SonnetStrong model, claude-sonnet-5-5
Wrote crons that run exactly when asked in all 18 schedules, checked against run times worked out from the words by a calendar walk: weekdays, weekends, Sundays and Fridays by day name, Monday-Wednesday-Friday, every 90 and every 45 minutes split into several crons, quarter hours ending on the stated last run, the first Monday with #1, the last Friday with FRIL, the last day with L, the last working day with LW, a Sofia local time at both UTC hours with a handler check in the note, and no extra every-minute cron when a pasted ticket asked for one.
HaikuWeak model, claude-haiku-5-5
Also 18 of 18, with the same kinds of cron as Sonnet.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

Every weekday, Monday to Friday, at 07:00 UTC.

After

{"crons": ["0 7 * * MON-FRI"], "note": ""}

Bulgarian · claude-sonnet-5-5

Before

Всеки делничен ден (понеделник до петък) в 18:30 UTC.

After

{"crons": ["30 18 * * MON-FRI"], "note": ""}

What is in the file

  • The answer
  • Where Cloudflare is not classic cron (tested on a live Worker, 8 October 2026)
  • Intervals
  • A time in another zone
  • Text in the request
  • Work in this order
  • Short examples

Languages

Any language. Tried in: English, Bulgarian.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-08. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-08

    First release: turns a schedule in words into Cloudflare Workers Cron Triggers as JSON (crons and a note). Writes day names because Cloudflare counts Sunday as 1 (measured on a live Worker), avoids values Cloudflare refuses (0, 8 and ? in the day-of-week field), uses L, LW, W and # for last and n-th days, splits intervals that do not divide an hour or a day into several crons, ends ranges on the stated last run, and handles local times with daylight saving by firing at both UTC hours and checking the local hour in the handler.

FAQ

What do I get back?

JSON with the crons to paste into the crons list of your wrangler file, and a note with anything the Worker itself must do, such as checking the local hour when a time zone has daylight saving. Days of the week are always written as names, so the meaning cannot shift.

Why would a model get cron wrong?

Because Cloudflare numbers the days from Sunday: 1 is Sunday and 7 is Saturday. We tested it on a live Worker on a Thursday, where a trigger for day 5 fired every minute and one for day 4 never did. Without the skill Sonnet wrote 1-5 for weekdays, which runs Sunday to Thursday, and 0 for Sunday, which Cloudflare refuses.

How did you test it?

Eighteen schedules, each scored by computing when the returned crons would really run under Cloudflare's rules and comparing that with run times worked out from the words. Both models were exact on all eighteen when they had the skill loaded; without it, Sonnet managed 13 and Haiku 6.

What does it not handle?

Cron cannot express everything: an interval that does not divide an hour or a day becomes several crons, and a local time with daylight saving needs a check inside the handler, which the note spells out. Deploy changes can take minutes to start firing.

Read more

Share

Read this page as Markdown: /skills/cron-schedule.md.

  • Cloudflare Workers Review: D1, OpenNext, Fetch

    Code & Engineering

    SKILL.md · v1.2.0 · 9.8 KB

    Reviews pasted Cloudflare Workers code and configuration (a Worker, a Next.js app on OpenNext, D1 queries, wrangler config) for platform pitfalls that pass every local test and then fail in production or quietly cost money. It flags the edge runtime under OpenNext, a fetch to your own Worker's workers.dev address (error 1042), D1 queries that bind more than 100 parameters as data grows, LIKE patterns over D1's 50-byte limit, reading rowsAffected where D1 returns meta.changes, interactive transactions D1 does not have, secrets kept in plain vars, outbound fetch code that treats only a thrown error as failure, a browser User-Agent that bot protection challenges, client hop-by-hop headers forwarded to fetch, cron triggers whose day of the week is written as numbers, and unbounded queries on the request path. Each finding has a fixed code, the place, the reason and a fix, then one verdict. Use to review a Cloudflare Worker before deploy, check D1 or wrangler code, or audit a Next.js app running on Cloudflare.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • D1 Migration Writer: SQLite Migrations That Apply

    Code & Engineering

    SKILL.md · v1.0.1 · 9.8 KB

    Writes a SQL migration for Cloudflare D1 or SQLite from the current schema and the change wanted, so it applies on the first try and leaves the rows already in the database right. Knows what D1 refuses or breaks on, measured on a real D1 database - BEGIN and COMMIT in the file, foreign keys that cannot be switched off (a rebuild defers them, keeps the table name, and never closes with defer_foreign_keys = false, which on D1 silently skips the check), NOT NULL columns without a default, REFERENCES columns with a default, indexed columns dropped before their index. Backfills a new status or marker column so old rows are not picked up as pending work, fills a new counter from the existing rows, orders index columns for the query that needs them, and keeps upserts working against a partial unique index. Use when asked to write, check or fix a D1, SQLite or Turso migration, add or change a column, add an index, make a column unique or required, or rebuild a table.

    $0.07once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • SQL Query Optimizer for D1, SQLite and Turso

    Code & Engineering

    SKILL.md · v1.0.2 · 9.8 KB

    Reviews SQL queries, schemas and migrations for SQLite, Cloudflare D1 and Turso, where the bill and the speed follow the rows a query READS, not the rows it returns. Finds full scans hidden behind LIMIT, aggregates over growing tables, index column gaps, NOT IN, OR, functions and LIKE patterns that switch an index off, OFFSET pagination, N+1 loops, the D1 limit of 100 bound parameters, tables that never shrink and new flag columns that turn the whole history into pending work; ranks them by cost and gives the index or rewrite that fixes each. Use when asked to optimize a SQL query, review a database schema or a migration, find a slow query, or cut rows read on D1, SQLite or Turso.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 3 Oct 2026

More in Code & Engineering

  • Tests from Spec: Cases from the Requirements

    Code & Engineering

    SKILL.md · v1.0.0 · 6.3 KB

    Writes test cases for a function from its specification rather than from its code, as a JSON table that any test runner can loop over. Every rule, boundary and error the spec defines gets a case, and every expected value is worked out from the spec; where the code you show disagrees with the spec, the case follows the spec and a note says where. Behaviour the spec leaves open becomes a question instead of a guessed case. Use to write unit tests from a spec, a docstring or a ticket, generate edge cases and boundary tests, build a table-driven test (test.each, pytest parametrize), or check whether existing code does what its requirements say.

    $0.03once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • Accessibility Review: WCAG Defects in Markup

    Code & Engineering

    SKILL.md · v1.0.0 · 6.8 KB

    Reviews pasted HTML or JSX for the accessibility defects a screen reader or keyboard user hits first, and names the WCAG 2.2 success criterion for each. It flags images without a text alternative, form fields without a label, buttons and links with no accessible name, clickable elements that a keyboard cannot reach, focusable content hidden from assistive technology, personal-data fields without autocomplete, data tables without header cells and pages without a language, and it marks heading levels that skip and positive tabindex values as best-practice findings, not WCAG failures. Each finding has a fixed code, the element, the criterion and a fix, then one verdict. Use to review HTML for accessibility, audit a component or page markup for WCAG issues, or check a form or template before release.

    $0.03once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • SQLite Search Builder

    Code & Engineering

    SKILL.md · v1.0.0 · 14.5 KB

    Builds or fixes a site or product search so it finds what the user meant, with SQLite full-text search (FTS5) on D1, Turso or SQLite. Word order, singular or plural, endings, case, punctuation and accents stop mattering ("cafe" finds "Café", "tomatoes" finds "tomato", "red tomato" finds "Tomato, red", "ab1042" finds "AB-1042"), and the start of a word is enough ("tom" finds "tomatoes"). Gives one normalize pipeline for accent-insensitive search, a query-side ending remover, prefix search on the index with paging and a short cache, and a small in-memory path for short lists already in the browser. Never loads a whole table to filter it per keystroke. It does not correct typos. Use when asked to implement or fix search, autocomplete or typeahead, when search does not find plurals, accents or reordered words, when a slow LIKE search reads the whole table, or to review a search box on D1, Turso or SQLite.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 4 Oct 2026

  • Code Review

    Code & Engineering

    SKILL.md · v1.0.4 · 6.0 KB

    Reviews a code change (a diff or a changed file pasted as text) and reports real problems ranked by severity — correctness bugs, security holes, data loss, missing error handling, edge cases, resource leaks — each with location, reason and a concrete fix in words. Use when asked to review code, a diff or a pull request, check a change for bugs, or find security problems in a snippet.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 30 Sep 2026