buildcron

Cron Expression for Every Wednesday

The cron expression for every Wednesday is 0 0 * * 3: it runs at 00:00 each Wednesday, once a week. Wednesday is day 3 when the week is counted from Sunday as 0.

CRON → ENGLISH
0 minute0 hour* day of month* month3 day of week
VALID EXPRESSION

At 12:00am on Wednesday.

0 0 * * 3

Standard 5-field crontab syntax. Day of month and day of week are OR'd when both are set.

NEXT 5 RUN TIMES · local time

What it does

Four of the five fields behave in the usual way — minute 0, hour 0, any day of the month, any month — and the last field restricts the run to Wednesdays. Because the day of month is left open, cron's rule of OR-ing the two day fields never comes into play, and the job simply runs every seventh day.

Midweek is a sensible slot for jobs that summarise the week so far or prepare for its second half: a mid-sprint progress report, a reminder about timesheets due on Friday, refreshing test data in a staging environment, or a weekly newsletter timed to land when inboxes are calmer than on a Monday.

People often want “every other Wednesday” for fortnightly jobs, and cron has no field for it — the day of month can't express it, because a fortnightly pattern drifts across months. The usual trick is to run every Wednesday and skip odd ISO week numbers: 0 9 * * 3 [ $(expr $(date +\%V) \% 2) -eq 0 ] && /path/to/job. Years with 53 ISO weeks break the rhythm once every five or six years.

How 0 0 * * 3 works, field by field

FIELDVALUEMEANING
Minute0minute 0
Hour0hour 0 (midnight)
Day of month*every day of the month
Month*every month
Day of week3Wednesday

Put together, cron reads 0 0 * * 3 as: “At 12:00am on Wednesday.

To see further ahead, paste the expression into the cron calculator, which lists the next ten run times and counts how many times the schedule runs in a year.

Frequently asked questions

How do I run a cron job every other Wednesday?

Standard cron can't count weeks, so schedule every Wednesday and let the command skip alternate weeks — for example by checking whether the ISO week number from date +%V is even. A systemd timer or a scheduler with interval support is cleaner if you have one.

What number is Wednesday in a cron expression?

Wednesday is 3. The day of week field runs from 0 for Sunday to 6 for Saturday, and most crons also accept the name WED.

How do I run a job every Wednesday at 2:30pm?

Use 30 14 * * 3. Hours use a 24-hour clock, so 2:30pm is minute 30 of hour 14.