Cron Expression Cheat Sheet (2026) — Every Field, Every Shortcut, Every Gotcha
The complete cron expression cheat sheet for QA and DevOps: 5-field POSIX, 6/7-field Quartz, @hourly / @daily shortcuts, timezone traps, and 30 copy-paste examples for Jenkins, GitHub Actions, K8s, and pg_cron.
2026-07-17 · By Avinash Kamble, reviewed by Priyanka G.
Every SDET eventually stares at a cron expression like */15 9-17 * * 1-5 and wonders which field is which. This cheat sheet is the reference we keep pinned in Slack — five fields, six fields with seconds, seven with year, plus the shortcuts and gotchas that cost teams a real incident.
Field layout — POSIX (5 fields) vs Quartz (6-7)
POSIX (Linux crontab, GitHub Actions, K8s CronJob, pg_cron, Node-cron, Vercel)
minute 0-59
hour 0-23
day-of-month 1-31
month 1-12 (or JAN-DEC)
day-of-week 0-6 (0=Sun; some engines: 7=Sun)
Quartz (Jenkins Quartz plugin, Spring @Scheduled, Elastic Job)
sec min hour dom mon dow [year]
0 */15 9-17 ? * MON-FRI 2026Gotcha: Quartz requires ? in either dom or dow (they can't both be specified). POSIX has no ?.
Operators - every symbol explained
* every value * * * * * every minute
, list 0,15,30,45 * * * *
- range 0 9-17 * * * every hour 9am-5pm
/ step */5 * * * * every 5 min
L last (Quartz) 0 0 L * ? midnight last day of month
W nearest weekday 0 0 15W * ? weekday closest to 15th
# nth weekday 0 0 ? * 2#1 first Monday of month
? no specific value used in dom OR dow (Quartz only)Shortcuts every QA should know
@yearly / @annually -> 0 0 1 1 *
@monthly -> 0 0 1 * *
@weekly -> 0 0 * * 0
@daily / @midnight -> 0 0 * * *
@hourly -> 0 * * * *
@reboot -> run once at startup (crontab only, NOT K8s)GitHub Actions and Kubernetes CronJob do not support @reboot. Jenkins pipeline supports @midnight with jitter (spreads jobs across the hour to avoid stampedes).
30 real-world expressions
# Smoke tests every 15 min during business hours, weekdays
*/15 9-17 * * 1-5
# Nightly regression at 2:30 AM
30 2 * * *
# Every Monday 6 AM - weekly report
0 6 * * 1
# First day of month, 00:05 - billing job
5 0 1 * *
# Every 6 hours
0 */6 * * *
# Twice a day (9 AM and 9 PM)
0 9,21 * * *
# Every Sunday at 3:15 AM - cleanup
15 3 * * 0
# Quartz: last Friday of month at 5 PM
0 0 17 ? * 6L
# Quartz: 2nd Tuesday at 10 AM
0 0 10 ? * 3#2
# Every 30 seconds (Quartz)
*/30 * * * * ?Timezone traps that cost us a real incident
- crontab uses the server timezone. Set
CRON_TZ=UTCat the top of the file to make it explicit. - Kubernetes CronJob was UTC-only until v1.25; now use
spec.timeZone: "America/New_York". - GitHub Actions schedules run in UTC only. There is no timezone option.
- pg_cron uses the database's
timezonesetting - check withSHOW timezone;. - Daylight saving: a
0 2 * * *job will run twice on the fall-back day and skip on spring-forward. Use0 3 * * *if you can't handle that.
Stop guessing - build and test in one place
Rather than counting stars in a terminal, paste any expression into the free Cron Expression Builder & Tester. It humanises the expression, shows the next 10 run times in your timezone, and exports the exact YAML/Groovy/SQL for Jenkins, GitHub Actions, Kubernetes CronJob, Quartz, Node-cron, pg_cron, Vercel, systemd, and AWS EventBridge.
Frequently asked questions
1.What's the difference between POSIX cron and Quartz cron?
2.Why does */5 in the day-of-month field behave oddly?
3.Does GitHub Actions support timezones in cron?
4.How do I run a job every 30 seconds?
Practice these questions
Rehearse Selenium and Playwright automation questions covering framework design, waits, locators and CI/CD.
Was this article helpful?
Keep building your QA edge
Pillar guides- Cron Expression Builder & Testertest your CI schedule before you deployVisual cron builder with next-10 run times, timezone picker, and one-click export to Jenkins, GitHub Actions, Kubernetes CronJob, Quartz, Node-cron, and pg_cron.
- AI Mock Interviewrehearse out loud with our coachLive AI-powered mock interviews with rubric feedback.
- ATS Resume Reviewrun your resume through our scannerFree AI ATS scoring with rewrite suggestions.
Continue reading

Playwright Locator Best Practices (2026) — The Only Guide You Need
11 min read
How to Migrate a Postman Collection to Playwright API Tests (2026 Guide)
12 min read
Why Every QA Engineer Must Master CI/CD Pipelines in 2026 (Or Risk Obsolescence)
12 min readJoin the QA Community
Connect with fellow testers, share job leads, and get career advice.
Stop Reinventing the Wheel. Upgrade Your QA Arsenal.
Take your testing skills from beginner to Lead Engineer. Supercharge your daily workflow with our premium digital resources.
- Ready-to-use testing strategy templates
- Advanced API & UI automation guides
- ⏱️ Save 10+ hours a week on test planning