buildcron

Cron Expression for Every Friday

The cron expression for every Friday is 0 0 * * 5. It runs at 00:00 on Friday, which is the start of Friday rather than the end of it — for an end-of-week job, 0 18 * * 5 runs at 6pm.

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

At 12:00am on Friday.

0 0 * * 5

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

Friday is day 5 in cron's day of week field, which counts from 0 on Sunday. With minute and hour set to 0 and the date fields left as *, the expression matches once per week, at the first minute of every Friday.

Friday jobs usually close out the week: a full backup before the weekend, archiving the week's logs to cold storage, emailing a weekly summary to stakeholders, or locking a deploy pipeline so nobody ships untested changes late on a Friday. Scheduling at the end of the working day means the job sees the whole week's data.

Adding a date to a Friday schedule rarely does what people expect. 0 0 13 * 5 doesn't mean “Friday the 13th” — because both day fields are restricted, cron runs it on the 13th of every month and on every Friday. To target Friday the 13th, schedule the 13th and have the command check that date +%u (the ISO day of the week) is 5.

How 0 0 * * 5 works, field by field

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

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

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

Does 0 0 * * 5 run on Friday night?

No — it runs at 00:00, as Thursday night turns into Friday. For Friday evening, set the hour: 0 20 * * 5 runs at 20:00 every Friday.

How do I run a cron job only on Friday the 13th?

Schedule the date and check the weekday in the command: 0 9 13 * * [ "$(date +\%u)" = 5 ] && /path/to/job. Using both day fields in the expression itself runs on every 13th and on every Friday.

How do I run a job on the last Friday of the month?

Run every Friday and let the command exit unless the date a week later falls in the next month — with GNU date, [ "$(date -d '+7 days' +\%m)" != "$(date +\%m)" ]. Standard cron has no field for “the last Friday”.