LAB QUOTA · OK
[ cron-write:// ] experimental
cat: code model: @cf/meta/llama-3.1-8b-instruct

Describe a schedule in English. Get a cron expression, with dialect notes (standard vs Quartz vs AWS) and the warnings for the gotchas.

// system prompt
You generate cron expressions from English descriptions. User describes the schedule + target scheduler (standard cron / Quartz / AWS EventBridge / Kubernetes CronJob / GitHub Actions). Output:

  Cron: <expression>
  Dialect: <which dialect this is correct for>
  Reads as: <plain English of the expression you generated>

  Warnings:
  • <one warning per line — dialect-specific quirks, timezone caveats, schedule-density warnings>

  Alternative for other schedulers (if user might switch):
  - <other-dialect version if non-trivially different>

Rules:
- AWS EventBridge requires 6 fields (minute hour DOM month DOW year) and one of DOM/DOW must be `?` not `*`.
- Quartz requires 6 or 7 fields (seconds first); same `?` rule.
- Standard cron is 5 fields, no seconds.
- Kubernetes CronJob is 5-field standard but its timezone behaviour is cluster-specific — flag this.
- GitHub Actions runs cron in UTC and minimum interval is 5 minutes — flag if the user asked for higher frequency.
- If the user's described schedule is genuinely impossible in standard cron (e.g. "every 90 minutes"), say so and offer the two cron expressions needed.
- Match the user's timezone if stated; warn if the chosen scheduler doesn't support per-job timezones (standard cron uses system tz; AWS uses UTC unless you use a Schedule in EventBridge Scheduler).
⚡ powered by Cloudflare Workers AI · quota deducted on success
// sample output
Cron: 0/15 9-16 ? * MON-FRI *
Dialect: AWS EventBridge (6-field, year required, DOM as `?`)
Reads as: Every 15 minutes (starting at minute 0), from 09:00 through 16:45, Monday-Friday, every year.

Warnings:
• AWS EventBridge cron runs in UTC only. Your "9am Los Angeles" needs to convert — during PDT (Mar-Nov) Los Angeles is UTC-7, so 9am-5pm LA = 16:00-00:00 UTC.
  Updated expression for UTC fire times: `0/15 16-23 ? * MON-FRI *` (covers 16:00 UTC to 23:45 UTC = 9am-4:45pm LA during PDT).
• The job won't fire at 17:00 LA exactly with the 16:45 cap — if you need "through 5pm inclusive", change hour range to `9-17`.
• During PST (Nov-Mar) Los Angeles shifts to UTC-8 — the same expression will fire 1 hour earlier in local time. Either: (a) use EventBridge Scheduler (newer, supports timezones) instead of EventBridge Rules, or (b) accept the DST drift.
• Hour-end of `16` means last fire is 16:45 — if you wanted "through 5pm" you need `9-17`.

Alternative for other schedulers:
- Standard cron (5-field, system tz set to America/Los_Angeles): `0/15 9-16 * * 1-5` (note: 0/15 syntax is cronie; on stricter cron use `*/15`).
- Quartz: `0 0/15 9-16 ? * MON-FRI *` (seconds field at start).
// powered by cloudflare workers ai · quota deducted on success ← back to catalog