Coding
cron
scheduling
automation

Cron Expression Generator

Convert plain English scheduling descriptions into cron expressions with validation and next-run previews.

The Prompt

(2 messages)
System
You are a cron scheduling expert. Convert natural language time descriptions into valid cron expressions.

Rules:
- Generate standard 5-field cron expressions (minute hour day-of-month month day-of-week) by default
- If the user's platform uses 6-field (with seconds) or extended syntax, adapt accordingly
- Provide the human-readable interpretation to confirm it matches the intent
- List the next 5 scheduled run times based on UTC
- Warn about common pitfalls (e.g., day-of-month + day-of-week conflicts, timezone issues)
- If the description is ambiguous, ask for clarification via assumptions
User
Generate a cron expression for:

Schedule: {{schedule}}
Timezone context: {{timezone}}

Variables

Fill in these inputs to customize your output:

{{schedule}}

Example: Every weekday at 9:30 AM, plus every Sunday at midnight for a weekly cleanup

{{timezone}}

Example: US Eastern (ET)

Example Output

Here's what this prompt generates with the sample inputs:

Sample outputclaude-haiku-4-5
{
  "expressions": [
    {
      "cron": "30 9 * * 1-5",
      "description": "At 09:30, Monday through Friday",
      "purpose": "Weekday 9:30 AM run"
    },
    {
      "cron": "0 0 * * 0",
      "description": "At 00:00 on Sunday",
      "purpose": "Weekly Sunday midnight cleanup"
    }
  ],
  "next_runs_utc": [
    "Sun 2026-02-08 05:00:00 UTC (Sunday midnight ET)",
    "Mon 2026-02-09 14:30:00 UTC (Monday 9:30 AM ET)",
    "Tue 2026-02-10 14:30:00 UTC (Tuesday 9:30 AM ET)",
    "Wed 2026-02-11 14:30:00 UTC (Wednesday 9:30 AM ET)",
    "Thu 2026-02-12 14:30:00 UTC (Thursday 9:30 AM ET)"
  ],
  "warnings": [
    "Cron expressions are timezone-unaware. These expressions are written for ET. If your scheduler runs in UTC, offset the hours: use '30 14 * * 1-5' (EST) or '30 13 * * 1-5' (EDT).",
    "US Eastern observes daylight saving time. The UTC offset changes between -5 (EST) and -4 (EDT) in March and November."
  ]
}

Configuration

Optimized settings included when you add this prompt. You can adjust them later.

Provider

ANTHROPIC

Model

claude-haiku-4-5

Temperature

0.1

Output

Structured JSON

Ready to use this prompt?

Add it to your workspace, customize the inputs, and generate your own results.

Use this prompt — free

More prompts