Every Thursday Cron Expression
Runs every Thursday at midnight.
0 0 * * 4 in POSIX cron
Expression
0 0 * * 4Try it in the tester →Field Breakdown
How It Works
Day-of-week pinned to 4 — fires only on Thursdays at 00:00.
Example Run Times
- Thu 00:00:00
- Thu 00:00:00 (+7d)
- Thu 00:00:00 (+14d)
- Thu 00:00:00 (+21d)
- Thu 00:00:00 (+28d)
Frequently Asked Questions
How do I run on Thursdays at 5 PM?
Change the hour field: `0 17 * * 4` fires every Thursday at 17:00.
0 0 * * 4 in Quartz / Spring
Midnight on Thursdays, 52-ish times a year. The 5 deserves a second look: in Unix cron 5 means Friday, but Quartz counts from Sunday as 1, landing 5 on Thursday.
Quartz / Spring expression
0 0 0 ? * 5Try it in the tester →At 00:00:00 on Thu
Unix / POSIX equivalent: 0 0 * * 4
@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
Thursday runs are the workhorse of pre-Friday preparation — cutting the weekly release candidate before a Friday code freeze, generating the numbers a Friday review meeting will discuss, or kicking a long-running weekly job that should finish well before the weekend skeleton crew takes over. Wire it through @Scheduled(cron = "0 0 0 ? * 5") in Spring or CronScheduleBuilder.cronSchedule() in Quartz, and consider spelling it THU in committed code so a reviewer never has to wonder which convention the 5 follows.
Quartz-Specific Notes
- →An engineer who writes 5 here intending Friday gets Thursday with no error of any kind — the schedule simply runs a day early, which can take weeks to notice.
- →Quartz's L suffix works on day-of-week too: 5L means the last Thursday of the month, no date arithmetic required.
- →The trigger fires at second 0 of 00:00, so a Thursday-stamped job actually begins the instant Wednesday ends — relevant if the job labels output with the previous business day.
Frequently Asked Questions
I copied a Unix crontab's 0 0 * * 4 and used 4 here — why does it run Wednesday?
Unix counts Monday as 1 (Thursday is 4); Quartz counts Sunday as 1 (Thursday is 5). Every weekday number shifts by one when crossing between the two systems. The converter applied that shift for you, which is why this expression ends in 5.
How would I run only on the last Thursday of each month?
Append L to the day number: 0 0 0 ? * 5L. Quartz resolves which Thursday is last in each specific month, including across leap years.
0 0 * * 4 in AWS EventBridge
Day-of-week 5 is Thursday in EventBridge's numbering, so this fires once a week at 00:00 UTC Thursday. It is the classic run-before-Friday slot: output produced overnight Thursday is on someone's desk with a full business day left to act on it.
AWS EventBridge expression
cron(0 0 ? * 5 *)Try it in the tester →At 00:00 UTC on Thu
Unix / POSIX equivalent: 0 0 * * 4
Field Breakdown
Using It with AWS EventBridge
Point the rule at the week's review machinery — a Step Functions pipeline that assembles the weekly engineering metrics pack, a Lambda that compiles open security findings from Security Hub into a triage list for Friday's review, or a capacity check that compares the week's traffic growth against quotas before the weekend leaves nobody watching. Thursday-night batch placement is a deliberate hedge: there is still a Friday to rerun if it fails, which a Friday-night schedule does not offer.
AWS-Specific Notes
- →The numeral 5 means THU here, while the identical numeral means Friday in a POSIX crontab — among the more dangerous single-character traps when migrating schedules to AWS.
- →For US readers the run arrives Wednesday evening local time (19:00–20:00 Eastern), so artifacts are genuinely ready first thing Thursday.
- →Adding a second Thursday fire time needs only an hour list, e.g. cron(0 0,12 ? * 5 *) for midnight and noon UTC on the same day-of-week constraint.
Frequently Asked Questions
How would I target only the last Thursday of each month?
Append L to the day number in the day-of-week field: cron(0 0 ? * 5L *). EventBridge interprets 5L as the final Thursday of the month, giving twelve runs a year.
I migrated 0 0 * * 4 from cron and it now runs Wednesdays — what happened?
POSIX 4 is Thursday, but EventBridge reads 4 as Wednesday because its week starts at Sunday=1. The converted form needs 5, or better, the name THU.
0 0 * * 4 in GitHub Actions
Weekly on Thursdays at 00:00 UTC — day-of-week 4 counting up from Sunday at 0. The Thursday slot is the workhorse of pre-Friday automation: whatever it produces has one full business day to be reviewed before the week closes.
GitHub Actions expression
0 0 * * 4Try it in the tester →At 00:00 UTC on Thu
Unix / POSIX equivalent: 0 0 * * 4
Field Breakdown
Using It with GitHub Actions
Configured as on: schedule: - cron: "0 0 * * 4" in workflow YAML on the default branch, Thursday cadence fits release-readiness checks ahead of a Friday cut, a weekly rebuild of QA fixtures so end-of-week testing starts fresh, or compiling the metrics that feed a Friday review meeting. The 00:00 UTC timing means the output exists before anyone in Europe wakes up on Thursday, and reaches US teams during their Wednesday evening — early enough that a failure can still be rerun manually with a workflow_dispatch trigger before the Friday it was protecting.
GitHub-Specific Notes
- →A common misreading: in 0 0 * * 4 the 4 is the fifth field (day-of-week, Thursday), not a calendar date — 0 0 4 * * would instead fire on the 4th of every month.
- →Thursday 00:00 UTC is Wednesday 19:00 EST or 20:00 EDT in New York; a job feeding a Friday-morning US meeting effectively has two days of slack, not one.
- →Every Thursday means every Thursday — there is no built-in skip for holidays like Thanksgiving, so jobs that page humans need their own calendar awareness.
Frequently Asked Questions
Does the 4 here mean Thursday or the 4th of the month?
Thursday. Position decides meaning: the day-of-week field is the fifth one, and 4 there is Thursday under Sunday = 0 numbering. The same digit in the third field would mean the 4th calendar day instead.
Quartz lets me write 4#2 for the second Thursday — does that work here?
No. GitHub Actions cron has no # token (and no L or W either); it is plain five-field syntax. To hit one specific Thursday per month, schedule a day-of-month window like 8-14 and have the job verify the weekday itself.