Every Weekend Cron Expression
Runs Saturday and Sunday at midnight.
0 0 * * 0,6 in POSIX cron
Expression
0 0 * * 0,6Try it in the tester →Field Breakdown
How It Works
Day-of-week field lists Sunday (0) and Saturday (6). Weekdays are skipped.
Example Run Times
- Sat 00:00:00
- Sun 00:00:00
- Sat 00:00:00 (next week)
- Sun 00:00:00 (next week)
- Sat 00:00:00 (week after)
Frequently Asked Questions
Why not `6,0`?
Order doesn't matter — cron evaluates membership, not sequence. `0,6` and `6,0` are equivalent.
0 0 * * 0,6 in Quartz / Spring
Midnight on Saturday and Sunday only — about 104 firings a year. The curious-looking */6 in the day-of-week field is doing real work: a step anchors at the field minimum, and Quartz's week runs 1-7 starting at Sunday, so */6 matches days 1 and 7, which are exactly SUN and SAT.
Quartz / Spring expression
0 0 0 ? * */6Try it in the tester →At 00:00:00 on Sun, Sat
Unix / POSIX equivalent: 0 0 * * 0,6
@Scheduled parser uses 0–7 with Monday = 1 — numeric day values mean different days in the two. The day names (MON, FRI, MON-FRI) are identical in both and safer to copy between them.Field Breakdown
Using It with Quartz / Spring
Weekend slots absorb work that's too disruptive for weekdays: full-table vacuum passes, search-index rebuilds, load tests against staging, or bulk media reprocessing while traffic is at its weekly low. Wire it into Spring with @Scheduled(cron = "0 0 0 ? * */6") or a Quartz CronTrigger as usual. Many teams rewrite the day field as SUN,SAT before merging, since a reviewer shouldn't need to mentally execute step arithmetic to confirm which days a job runs.
Quartz-Specific Notes
- →Step expansion: starting at the day-of-week minimum 1 and adding 6 lands on 7, then overflows — so */6 yields the set {1, 7}, Sunday and Saturday, nothing else.
- →0 0 0 ? * 1,7 and 0 0 0 ? * SUN,SAT are exact equivalents; the name form is the most self-documenting of the three.
- →Crontab's weekend list 0,6 does not port: Quartz has no day 0 (the parser rejects it), and 6 in Quartz is Friday.
- →The firings land at 00:00 Saturday and 00:00 Sunday — that is, Friday night and Saturday night in everyday speech.
Frequently Asked Questions
How does */6 end up meaning the weekend?
Steps count up from the field's minimum. Day-of-week in Quartz spans 1-7 with SUN=1, so */6 matches 1 and 1+6=7 — Sunday and Saturday. It's a compact (if cryptic) encoding of the two weekend days.
I ported 0 0 * * 0,6 from crontab and Quartz threw a parse error — why?
Two reasons: Quartz needs six fields with seconds first, and its day-of-week range is 1-7, so the 0 is illegal. The weekend in Quartz terms is 1,7 (or SUN,SAT), giving 0 0 0 ? * 1,7.
Will my weekend job also catch Friday evening?
No. The first weekend firing is 00:00 Saturday. If you want work to start Friday after hours, add a Friday-evening trigger such as 0 0 22 ? * 6 alongside this one.
0 0 * * 0,6 in AWS EventBridge
This rule wakes up twice a week, at 00:00 UTC on Saturday and Sunday. The curious-looking */6 in day-of-week steps through the 1-to-7 range starting at 1, matching 1 and 7 — and since EventBridge numbers Sunday as 1 and Saturday as 7, those two values are exactly the weekend.
AWS EventBridge expression
cron(0 0 ? * */6 *)Try it in the tester →At 00:00 UTC on Sun, Sat
Unix / POSIX equivalent: 0 0 * * 0,6
Field Breakdown
Using It with AWS EventBridge
Weekend-only schedules suit work you deliberately keep away from business hours: long-running OpenSearch reindexes, RDS snapshot copies to another region, batch model retraining on ECS, or load tests against staging. Register the expression with put-rule or as an EventBridge Scheduler schedule and point it at a Step Functions state machine if the weekend job has several phases. Note that day-of-month carries the ? in this expression because day-of-week is doing the selecting — the mutual-exclusion rule between the two day fields works in both directions.
AWS-Specific Notes
- →If */6 reads as a puzzle, cron(0 0 ? * 1,7 *) and cron(0 0 ? * SAT,SUN *) select the identical days; the converter emits the step form because it is the mechanical translation of the POSIX 0,6 list.
- →Saturday 00:00 UTC is still Friday evening across the Americas — Friday 7 or 8 PM Eastern — so the first weekend run lands before the local weekend begins.
- →Two firings per week works out to roughly 104 invocations per year from this single rule.
Frequently Asked Questions
How does */6 end up meaning Saturday and Sunday?
A step expression matches the range start and every sixth value after it. EventBridge day-of-week runs 1 through 7 with Sunday as 1, so */6 hits 1 and 7 — Sunday and Saturday. It is equivalent to writing 1,7 or SAT,SUN.
I want one run covering the whole weekend, not two — what should I change?
Pick a single day. cron(0 0 ? * 7 *) fires only at 00:00 UTC Saturday, giving the job the entire weekend to finish before Monday traffic returns.
Why is the ? in day-of-month here when other examples put it in day-of-week?
Exactly one of the two day fields must be ?, and it goes in whichever field you are not constraining. This schedule selects by weekday, so day-of-month is the one that yields.
0 0 * * 0,6 in GitHub Actions
The day-of-week list 0,6 selects Sunday and Saturday in GitHub's numbering, producing two runs per week at 00:00 UTC — 104 a year. It is the schedule for work you deliberately push out of the Monday-to-Friday window.
GitHub Actions expression
0 0 * * 0,6Try it in the tester →At 00:00 UTC on Sun, Sat
Unix / POSIX equivalent: 0 0 * * 0,6
Field Breakdown
Using It with GitHub Actions
Written as on: schedule: - cron: "0 0 * * 0,6" in workflow YAML, the weekend pair suits jobs too hungry to share weekday capacity with your team's pull-request CI: exhaustive browser or OS matrix runs, repo-wide static analysis at maximum depth, or large artifact rebuilds. Anything queued on Saturday and Sunday competes with far fewer of your own organization's runs, so long jobs finish without making developers wait on checks. The three-letter names work too — "0 0 * * SAT,SUN" is the same schedule spelled for humans.
GitHub-Specific Notes
- →The two fire times are only 24 hours apart — Saturday 00:00 and Sunday 00:00 UTC — followed by a six-day gap, so this is a back-to-back pair at the week boundary rather than runs spread across the weekend.
- →Saturday 00:00 UTC is still Friday evening throughout the Americas (19:00 Friday in New York under EST, 16:00 in Los Angeles under PST), so US teams effectively get a Friday-night and Saturday-night run.
- →Day-of-week here counts Sunday as 0 and Saturday as 6; the documented SUN-SAT names are interchangeable with the numbers.
Frequently Asked Questions
Does 0 0 * * 0,6 run once per weekend or twice?
Twice — once at the start of Saturday UTC and once at the start of Sunday UTC. For a single weekend run, pick one day: "0 0 * * 6" for Saturday only.
Can the weekend job cover both days' work in one run instead?
Yes — schedule only the Saturday tick and size the job's window to 48 hours, or keep both ticks and make the job idempotent so the Sunday run is a cheap no-op when Saturday already finished the work.