Home › Developer Tools › Cron Expression Generator

Cron Expression Generator

Click together a cron schedule or paste an existing one. The generator explains it in plain English, checks every field and lists the next run times in your local time zone or UTC.

Last updated:

Builder

Next run times

    Advertisement
    Advertisement

    How to use the Cron Expression Generator

    1. Start from a preset or type an expression such as */15 9-17 * * 1-5 into the box.
    2. Fine-tune each field with the builder tabs: every unit, every N units, specific values or a range.
    3. Read the plain-English line to confirm the schedule means what you intend.
    4. Check the next run times. Switch between local time and UTC, or choose a different start date, then press Calculate Next Runs.
    5. Copy the expression (or the full crontab line) into your crontab, CI pipeline or scheduler.

    Cron syntax at a glance

    ┌───────────── minute (0–59)
    │ ┌─────────── hour (0–23)
    │ │ ┌───────── day of month (1–31)
    │ │ │ ┌─────── month (1–12 or JAN–DEC)
    │ │ │ │ ┌───── day of week (0–6 or SUN–SAT, 7 = Sunday)
    │ │ │ │ │
    * * * * *  command to run
    SymbolMeaningExampleMatches
    *Every value* in hour0, 1, 2 … 23
    ,List1,15 in day of monththe 1st and the 15th
    -Range (inclusive)1-5 in day of weekMonday to Friday
    /Step*/15 in minute0, 15, 30, 45
    a-b/nStep within a range9-17/2 in hour9, 11, 13, 15, 17
    a/nStep from a to the end5/20 in minute5, 25, 45

    Common cron schedules

    ExpressionRuns
    */5 * * * *Every 5 minutes
    0 * * * *At the start of every hour
    0 */6 * * *At 00:00, 06:00, 12:00 and 18:00
    0 0 * * *Every day at midnight (same as @daily)
    30 8 * * 1-508:30 Monday to Friday
    */15 9-17 * * 1-5Every 15 minutes from 09:00 to 17:45 on weekdays
    0 3 * * 0Sundays at 03:00
    0 0 1 * *Midnight on the 1st of every month (@monthly)
    0 0 1 1,4,7,10 *Quarterly: 1 January, April, July and October
    0 0 29 2 *Only on 29 February: once every leap year

    The day-of-month and day-of-week rule

    When both day fields are restricted, cron runs on days that match either of them. When either field starts with *, a day has to match both. Worked examples, starting from Thursday 1 January 2026:

    ExpressionLogicFirst runs
    0 9 1,15 * MONday 1 or 15 or MondayJan 1, Jan 5, Jan 12, Jan 15, Jan 19, Jan 26, Feb 1 … at 09:00
    0 9 * * MONevery day and Monday = MondaysJan 5, Jan 12, Jan 19 … at 09:00
    0 9 */2 * MONodd days and Monday (field starts with *)Jan 5, Jan 19, Feb 9 … at 09:00
    0 9 13 * FRIthe 13th or any Friday (not just Friday the 13th)Jan 2, Jan 9, Jan 13, Jan 16 … at 09:00

    To run only on, say, the first Monday of the month, schedule 0 9 1-7 * * and check the weekday inside the command, for example [ "$(date +\%u)" = 1 ] && /path/to/job. In a crontab file, % must be escaped as \%.

    Time zones and daylight saving time

    System cron daemons use the server's local time zone (or CRON_TZ / TZ where supported); Kubernetes CronJobs default to the controller's time zone unless spec.timeZone is set; GitHub Actions schedules always run in UTC. When clocks spring forward, local times inside the skipped hour do not exist and the next-run list leaves them out; when clocks fall back, a repeated hour is shown once. Use UTC for jobs that must run at exact intervals all year.

    Frequently asked questions

    What are the five fields of a cron expression?

    In order: minute (0–59), hour (0–23), day of month (1–31), month (1–12 or JAN–DEC) and day of week (0–6 or SUN–SAT, where 7 also means Sunday). A * means every value, so * * * * * runs every minute.

    What happens when both day of month and day of week are set?

    Standard cron runs the job when EITHER matches. 0 9 1 * MON runs at 09:00 on the 1st of every month and on every Monday. The OR rule only applies when both fields are restricted: if one of them starts with *, both must match. The next-run list follows these rules exactly.

    How do I run a cron job every 5 minutes?

    Use */5 * * * *. The step value after the slash repeats from the start of the range, so it runs at minutes 0, 5, 10 … 55 of every hour. 5-59/10 would run at 5, 15, 25, 35, 45 and 55.

    Which time zone does cron use?

    Classic cron uses the server's local time zone. Many cloud schedulers and CI systems, such as GitHub Actions, use UTC. Switch the next-run list to UTC to see when such a job will really fire. During daylight-saving changes, local times that do not exist are skipped.

    Does this support seconds or Quartz syntax?

    This tool covers the standard 5-field Unix cron format used by crontab, Kubernetes CronJobs and most CI systems. Quartz and Spring add a seconds field and special characters like L, W and #, which are reported as unsupported.

    What do @daily, @weekly and the other macros mean?

    @yearly (or @annually) = 0 0 1 1 *, @monthly = 0 0 1 * *, @weekly = 0 0 * * 0, @daily (or @midnight) = 0 0 * * * and @hourly = 0 * * * *. @reboot runs once at startup and has no schedule.

    Is anything sent to a server?

    No. Parsing, the English description and the run-time calculation all happen in your browser.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Regex TesterTest and debug regular expressions live.YAML Validator & FormatterValidate, format and minify YAML, and convert YAML to JSON or back.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.SQL Formatter & BeautifierFormat, beautify or minify SQL queries for MySQL, PostgreSQL and more.Is It Worth Automating? CalculatorTime saved by automating a task over years vs time to build it: payback and net hours.Chmod CalculatorConvert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.GitLab CI Config GeneratorGenerate a .gitlab-ci.yml with stages, jobs, images, cache, artifacts and rules from templates.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.PIN GeneratorGenerate random 4, 6 or 8-digit PINs that avoid sequences, repeats, dates and common PINs.Product Schema GeneratorBuild Product JSON-LD with price, availability, brand, GTIN, ratings and reviews.Question Keyword GeneratorFind the questions people ask about a topic, grouped by who, what, why, how, can and more.Recipe Schema GeneratorCreate Recipe JSON-LD with ingredients, steps, prep and cook times, nutrition and ratings.Security Headers GeneratorPick HSTS, CSP, frame, referrer and permissions options and get Apache, Nginx, Netlify or Cloudflare config.SKU GeneratorBuild consistent SKUs from brand, category, size and color, then export every variant as CSV.Typography Scale GeneratorBuild a modular type scale from a base size and ratio, then copy CSS variables or a Tailwind config.WordPress Salt GeneratorGenerate fresh WordPress security keys and salts for wp-config.php, .env or Docker in one click.ANSI Color Code GeneratorStyle terminal text with 16, 256 or RGB colors and get escape codes for bash, Python, JS and C.Apache Virtual Host GeneratorCreate an Apache VirtualHost config with SSL, redirects, reverse proxy or PHP-FPM in seconds.Bash Prompt GeneratorDrag and drop a custom PS1 prompt for bash or zsh with colors, git branch and a live preview.Changelog GeneratorTurn Conventional Commit messages into a grouped Keep a Changelog Markdown file per version.cURL Command BuilderBuild curl commands from a form: method, headers, query, JSON or form body, auth and flags.Docker Compose to KubernetesConvert docker-compose.yml into Kubernetes Deployment, Service, ConfigMap and PVC manifests.Docker Compose ValidatorCheck a docker-compose.yml for YAML errors, schema mistakes, broken references and deprecated keys.Dockerfile LinterLint a Dockerfile for best practices: pinned tags, apt cleanup, non-root USER and layer count.Dockerignore GeneratorBuild a .dockerignore from Node, Python, Go and Java templates, plus your own entries.ESLint Config GeneratorGenerate a flat eslint.config.js for JavaScript, TypeScript, React or Node with rule presets.Git Branch Name GeneratorTurn a ticket ID and title into a clean, valid git branch name like feature/PROJ-12-add-login.Jinja2 Template TesterRender Jinja2 templates with YAML or JSON variables using real Jinja2, with clear error lines.JSON Schema Mock Data GeneratorGenerate realistic sample JSON from a JSON Schema: formats, patterns, $ref, seeds and counts.Kubernetes Secret GeneratorCreate Kubernetes Secret YAML from key/value pairs or .env with auto base64, or decode one.Prettier Config GeneratorToggle Prettier options, preview formatted code live and copy your .prettierrc file.README Badge GeneratorCreate Shields.io-style README badges for license, version, build and custom labels.Systemd Service File GeneratorCreate a systemd .service unit with ExecStart, user, restart policy, environment and hardening.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.
    See all 85 Code Generators & Builders →