---
name: cron-expression-builder
description: "The exact cron expression for a schedule you describe in words, in the right dialect, with a plain-English reading and the next run times to confirm it. Use when someone has a job schedule in words and needs the cron expression for Linux cron, EventBridge, Quartz, or GitHub Actions. Do not use for writing the job script itself or running a scheduler service. Related topics: devops, utility, coding."
---

# Cron Expression Builder

The exact cron expression for a schedule you describe in words, in the right dialect, with a plain-English reading and the next run times to confirm it.

## When to use

Use this skill when someone has a job schedule in words and needs the cron expression for Linux cron, EventBridge, Quartz, or GitHub Actions. Do not use it for writing the job script itself or running a scheduler service.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Parse the schedule into minute, hour, day, month, and weekday components and resolve any ambiguity.
3. Convert the time to the server timezone and note daylight saving behaviour.
4. Write the expression in the chosen syntax, done when field count and special characters match that dialect.
5. Explain each field in plain English and list the next run times if requested.
6. Add the wrapper script with logging and an overlap lock if requested.

## Inputs

- **Schedule in plain words** (longer free text)
- **Server timezone** (free text, e.g. "UTC or EST")
- **Syntax type** (choose one: Standard Linux cron, AWS EventBridge, Quartz or Spring, GitHub Actions)
- **Show the next 5 run times** (choose one: Yes, No)
- **Add a bash wrapper example** (choose one: Yes, No)

## Output

The expression in a code block, a field-by-field reading, timezone notes, optional next five run times, and an optional wrapper script.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### Cron Expression

Build the cron expression for the schedule below.

- Schedule in plain words: {{Schedule in plain words}}
- Server timezone: {{Server timezone}}
- Syntax type: {{Syntax type}}
- Show the next 5 run times: {{Show the next 5 run times}}
- Add a bash wrapper example: {{Add a bash wrapper example}}

Give the expression in the chosen syntax, then a field-by-field breakdown (minute, hour, day of month, month, day of week, plus seconds or year where that syntax has them). Convert the requested time into the server timezone and say what happens at daylight saving changes. Note dialect traps: EventBridge needs a question mark in one day field, Quartz has a seconds field, and GitHub Actions always runs in UTC. If run times are requested, list the next five from a stated start date. If a wrapper is requested, include a script that logs start and end and prevents overlapping runs.

## Pitfalls

- Using the five-field Linux form in Quartz or EventBridge, which expect different fields.
- Forgetting that GitHub Actions schedules run in UTC, so the job fires at the wrong local hour.
- Setting both day-of-month and day-of-week, which in Linux cron means either, not both.
