Guides हि
Bramhify Pro

Unlock advanced tools, unlimited usage, and priority support.

Upgrade Now
Article · (Updated: Nov 18, 2026) · 7 min read

Cron Expression Generator: Visual Builder & Recipes

A cron job firing at the wrong hour in production is one of the sneakiest operational bugs in software engineering. Nothing crashes, no exception is thrown, and the logs look clean — yet a database backup ran at peak traffic or a Monday report fired on Sunday night because of one misplaced asterisk or timezone mismatch.

This guide explains the exact 5-field cron syntax, gives you copy-ready recipes for Linux crontab, GitHub Actions, Kubernetes CronJobs, and Node.js, and shows how to validate schedules offline without pasting internal operational cadences into third-party websites.

Cron Syntax: The Five Fields You Must Know

A standard Unix/Linux cron expression consists of five space-separated fields:

┌──── Minute (0–59)
│  ┌─── Hour (0–23)
│  │  ┌── Day of Month (1–31)
│  │  │  ┌─ Month (1–12 or JAN–DEC)
│  │  │  │  ┌ Day of Week (0–7, where 0 and 7 = Sunday, or SUN–SAT)
│  │  │  │  │
*  *  *  *  *
CharacterMeaningExamplePlain-English Schedule
*Every value* * * * *Runs every single minute
,List of values0 9,17 * * *Runs at 9:00 AM and 5:00 PM
-Inclusive range0 9-17 * * 1-5Every hour from 9 AM to 5 PM, Mon–Fri
/Step interval*/15 * * * *Every 15 minutes (:00, :15, :30, :45)
LLast (Quartz/AWS only)0 0 L * *Last day of the month (not standard Unix cron)

Three Classic Cron Traps That Bite Experienced Engineers

  1. UTC vs. Local Timezone Drift: GitHub Actions, Kubernetes, AWS, and most Linux VPS instances default to UTC. If you schedule 0 9 * * * expecting 9:00 AM IST (UTC+5:30), it actually fires at 2:30 PM IST. Always convert to UTC (e.g., 30 3 * * * = 9:00 AM IST) or set CRON_TZ=Asia/Kolkata where supported.
  2. Day-of-Month + Day-of-Week Is an OR, Not an AND: Writing 0 9 15 * 1 does not mean "9 AM on the 15th only if it's a Monday." Standard Unix cron executes when either Day-of-Month (15) OR Day-of-Week (Monday) matches!
  3. 5-Field vs. 6-Field Schedulers: Standard Unix crontab, GitHub Actions, and Kubernetes use 5 fields (minute precision). Java Quartz, Spring @Scheduled, and node-cron support 6 fields (leading seconds field). Pasting a 6-field expression into Linux crontab silently fails or triggers an error.

Why Build & Verify Cron Expressions Offline?

While crontab.guru is popular, teams in regulated enterprise environments often avoid pasting internal billing cycles, backup windows, or deployment schedules into external services. Bramhify's Cron Expression Generator builds, translates into plain English, and validates schedules 100% locally in your browser — zero network requests, zero tracking, works offline.

Cron Expression Generator:

Bramhify Cron Expression Generator tool in action Bramhify Cron Expression Generator tool in action
Visually build and verify 5-field cron schedules completely offline in your browser.
Cron Expression Generator 100% Private, Fast, No Data Stored

Copy-Ready DevOps Cron Recipes (GitHub Actions, Kubernetes & Linux)

1. GitHub Actions Scheduled Workflow (Always UTC!)

GitHub Actions runs all schedule: crons strictly in UTC (minimum interval: every 5 minutes):

on:
  schedule:
    # Runs every Monday at 10:30 AM IST (05:00 UTC)
    - cron: '0 5 * * 1'
  workflow_dispatch: # Always include manual trigger for testing!

2. Kubernetes CronJob With Explicit Timezone (v1.27+)

apiVersion: batch/v1
kind: CronJob
metadata:
  name: nightly-db-backup
spec:
  schedule: "0 2 * * *"
  timeZone: "Asia/Kolkata"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure

3. Linux crontab -e With Log Redirection

# Run database cleanup every Sunday at 3:15 AM and log stdout + stderr
15 3 * * 0 /usr/local/bin/cleanup-db.sh >> /var/log/cleanup-db.log 2>&1

Common Cron Expressions Cheat Sheet

ExpressionMeaning (Server Time / UTC)Equivalent in IST (UTC+5:30)
*/5 * * * *Every 5 minutesEvery 5 minutes
*/15 * * * *Every 15 minutesEvery 15 minutes
0 * * * *Every hour on the hour (:00)Every hour at :30 if server is UTC
0 0 * * *Daily at midnight (00:00 UTC)Daily at 05:30 AM IST
30 4 * * 2,5Tue & Fri at 04:30 UTCTue & Fri at 10:00 AM IST
0 9 * * 1-5Weekdays at 09:00Weekdays at 02:30 PM IST (if UTC)
0 0 1 * *1st of every month at midnight1st of every month at 05:30 AM IST

Need to verify script permissions on your Linux server before scheduling a cron job? Pair this with our Linux chmod Calculator and JSON to YAML Converter Guide.

Frequently Asked Questions (FAQs)

What is the difference between 5-field and 6-field cron expressions?

Standard Unix/Linux cron, GitHub Actions, and Kubernetes use 5 fields (minute hour day-of-month month day-of-week). Schedulers such as Quartz (Java), Spring Boot, and node-cron add a 6th leading field for seconds. Always confirm whether your runtime expects 5 or 6 fields before deploying.

How do I schedule a cron job to run every 5 minutes?

Use */5 * * * *. The */5 step operator in the minute field triggers at :00, :05, :10, ..., :55 every hour, every day.

Why did my GitHub Actions cron run late or at the wrong time?

Two reasons: first, GitHub Actions evaluates cron: strictly in UTC, not your local timezone. Second, during high load at the top of the hour (0 * * * *), GitHub may delay scheduled workflows by 5–20 minutes — pick an off-peak minute like 17 4 * * * for more punctual execution.

Why didn't my Linux cron job execute my shell script?

The top three causes are: missing execute permission (fix with chmod 755 /path/to/script.sh), relative paths inside the script (cron runs with a minimal PATH — always use full paths like /usr/bin/node), or missing a trailing newline at the end of the crontab file.

Can I run a cron job on the last day of every month in standard Unix cron?

Standard Unix crontab does not support the L flag. The portable workaround is to run daily from the 28th to the 31st and guard with a one-line date check: 0 23 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /path/to/job.sh.

Developer & Data Workflows

More Essential Guides in this Series

Practical developer utilities — JSON formatting, regex testing, diff comparisons, cron syntax, and data conversions.

Try it yourself

Visually build cron schedules.

Open Cron Expression Generator →