Every Tuesday Cron Expression
Runs every Tuesday at midnight.
0 0 * * 2 in POSIX cron
Expression
0 0 * * 2Try it in the tester →Field Breakdown
How It Works
Day-of-week pinned to 2 — fires only on Tuesdays at 00:00.
Example Run Times
- Tue 00:00:00
- Tue 00:00:00 (+7d)
- Tue 00:00:00 (+14d)
- Tue 00:00:00 (+21d)
- Tue 00:00:00 (+28d)
Frequently Asked Questions
Can I use `TUE` instead of `2`?
On Vixie cron, GitHub Actions, and AWS EventBridge, yes. Strict POSIX cron requires numeric values.
0 0 * * 2 in Quartz / Spring
Midnight every Tuesday — about 52 firings a year. The 3 in the final position is the part that trips people: Quartz weeks begin with Sunday as 1, so Tuesday is day 3, not the 2 a crontab would use.
Quartz / Spring expression
0 0 0 ? * 3Try it in the tester →At 00:00:00 on Tue
Unix / POSIX equivalent: 0 0 * * 2
@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
Tuesday is a popular weekly anchor precisely because it isn't Monday: the week's deploys and Monday firefights have settled, leaving a calm slot for weekly index rebuilds, dependency-update scans, or report generation. Spring takes the string directly in @Scheduled(cron = "0 0 0 ? * 3"); in Quartz, attach it via CronScheduleBuilder when constructing the trigger. Writing the day as TUE instead of 3 costs nothing and spares the next reader a trip to the numbering table.
Quartz-Specific Notes
- →Porting a Unix 0 0 * * 2 by copying the 2 would silently move this job to Monday in Quartz; the offset-by-one between the two numbering schemes is the most common translation bug in either direction.
- →Because the constraint is weekday-based, the ? occupies day-of-month — the expression would be rejected if both day fields held concrete values.
- →Quartz's # token extends this pattern to monthly cadences: 3#2 in the day-of-week field means the second Tuesday of the month, the schedule Patch Tuesday made famous.
Frequently Asked Questions
How do I fire on the second Tuesday of each month instead of every Tuesday?
Use the nth-weekday token: 0 0 0 ? * 3#2. The # operator is native Quartz (and supported by Spring 5.3+), so no calendar arithmetic in your job code is needed.
Is 0 0 0 ? * TUE identical to this expression?
Yes — Quartz accepts three-letter day names interchangeably with numbers, and TUE removes any doubt about whether the author knew Sunday is 1.
0 0 * * 2 in AWS EventBridge
Fifty-two runs a year, each at 00:00 UTC as Tuesday begins. The day-of-week field reads 3 rather than the POSIX 2 because EventBridge counts its week from Sunday as 1, making Tuesday the third day.
AWS EventBridge expression
cron(0 0 ? * 3 *)Try it in the tester →At 00:00 UTC on Tue
Unix / POSIX equivalent: 0 0 * * 2
Field Breakdown
Using It with AWS EventBridge
Set the expression on a rule and let it open your weekly maintenance lane: kicking off a Systems Manager Patch Manager run across the fleet, rebuilding golden AMIs with the week's updates baked in, or rotating credentials that operate on a seven-day cycle. Tuesday is a deliberate choice in a lot of shops — it dodges Monday's deploy-freeze and post-weekend incident triage while leaving three working days to absorb anything the maintenance breaks before Friday.
AWS-Specific Notes
- →Day-of-week 3 equals TUE; the three-letter name is accepted and immune to numbering confusion when the rule is reviewed later.
- →00:00 UTC Tuesday is still Monday evening across the Americas (19:00–20:00 Eastern), so US on-call rotations experience this as a Monday-night event.
- →With day-of-week populated, the ? is required in day-of-month — EventBridge will not validate the expression with values in both day fields.
Frequently Asked Questions
My crontab said 0 0 * * 2 for Tuesday — why is it 3 here?
Linux cron numbers Sunday as 0, putting Tuesday at 2. EventBridge numbers Sunday as 1, pushing Tuesday to 3. The same shift applies to every weekday when you port an expression across.
Can I run only on the second Tuesday of each month, Patch Tuesday style?
Yes — EventBridge's day-of-week field supports the nth-occurrence token: cron(0 0 ? * 3#2 *) matches the second Tuesday only, twelve runs a year.
0 0 * * 2 in GitHub Actions
Fifty-two runs a year, each at 00:00 UTC on a Tuesday — day-of-week 2 in GitHub's numbering, where the count starts at Sunday = 0. Picking Tuesday over Monday is often deliberate: it gives weekly automation a one-day offset from the mountain of Monday-anchored jobs across the platform.
GitHub Actions expression
0 0 * * 2Try it in the tester →At 00:00 UTC on Tue
Unix / POSIX equivalent: 0 0 * * 2
Field Breakdown
Using It with GitHub Actions
The workflow declares on: schedule: - cron: "0 0 * * 2" and must live on the default branch to fire. Tuesday-midnight cadence works well for weekly dependency-bump pull requests that the team reviews over Tuesday coffee, recurring database maintenance, or a weekly cleanup of merged branches. Because the tick lands at 00:00 UTC, the Americas experience it as Monday evening — 7:00 or 8:00 PM Eastern — so a US team gets the results in their Tuesday-morning inbox without the job actually running on their Tuesday.
GitHub-Specific Notes
- →GitHub accepts day names as well as numbers in this field, so 0 0 * * TUE is an exact synonym — handy insurance against the perennial is-Sunday-zero-or-one doubt.
- →Tuesday 00:00 UTC falls on Monday 19:00 or 20:00 in US Eastern time, which matters if the job touches systems with US-business-hours maintenance freezes.
- →This fires every Tuesday, all 52 of them; month-anchored variants like the second Tuesday need extra logic, since five-field cron cannot count weekday occurrences.
Frequently Asked Questions
How do I target only Patch Tuesday (the second Tuesday of the month)?
Schedule 0 0 8-14 * * — the 8th through 14th always contain exactly one Tuesday — and make the first job step exit unless date +%u prints 2. Do not write 0 0 8-14 * 2: when both day fields are restricted, cron treats them as OR, so that fires on all of days 8-14 plus every Tuesday of the month.
In GitHub Actions cron, is 2 Tuesday or Wednesday?
Tuesday. The day-of-week field counts from Sunday = 0, so Monday is 1 and Tuesday is 2. If you have been working in a system that starts the week at Monday = 0, this is the off-by-one to check.