NV ToolkitFormat · Validate · Convert

Cron example

Cron Every Friday at 5 PM

0 17 * * 5

At 05:00 PM, only on Friday

Open in the cron expression generator

End of the working week: hour 17 on day-of-week 5. Two conversions are happening at once here — 5 PM becomes 17 on the 24-hour clock, and Friday becomes 5 in a week that starts counting at Sunday. Confusing the two produces a job that runs at 5 AM on Friday, or at 5 PM on Thursday.

By NaveenKumar T · Updated · 5-field crontab expression

What each field means

Minute, hour, day of month, month, day of week — read left to right.
FieldValueMeaning
Minute0Minute 0
Hour17Hour 17
Day of month*Every day
Month*Every month
Day of week5Friday

Next 5 run times

Computing the next runs in your timezone…

Two fives that mean different things

The hour field uses a 24-hour clock, so 5 PM is 17 and a bare 5 would mean five in the morning. The day-of-week field counts from Sunday as 0, so Friday is 5. The coincidence that Friday's number matches the 12-hour form of the time is exactly why this expression is worth reading carefully: 0 5 * * 5 is a valid schedule and a completely different one.

If names are clearer to you, most modern crons accept 0 17 * * FRI. Names cannot be combined with steps in every implementation, but for a single pinned day they are safer and self-documenting in a crontab someone else will inherit.

What to put here, and what not to

Friday evening suits work that closes the week: timesheet reminders, weekly summary emails, archiving the week's logs, exporting reports for Monday, and kicking off a long batch that has the whole weekend to run. The machine is quiet and nobody is waiting on the result.

It is a poor place for anything that can fail loudly. A job that starts at 17:00 Friday and breaks at 17:20 is discovered on Monday morning at best, and by a customer at worst. If the work is important, schedule it Friday morning so there is a working afternoon to fix it, or wire it to an alert that actually reaches someone over the weekend.

Variations on the weekly theme

For the last working day of the month rather than every Friday, cron alone cannot express it — you need a daily schedule plus a date check inside the command, the same technique the last day of the month page describes.

To run on the last two working days of the week, use a list: 0 17 * * 4,5. To start the week instead of ending it, Monday at 8 AM is the natural counterpart. And to hand the weekend a long batch, Saturday gives it a full 48 hours.

Build a variant of this schedule with dropdowns and check the next ten runs before you install it.

Open the cron generator

Related cron examples

Browse every schedule on the cron expression generator, read the cron expression syntax guide for the rules behind the five fields, or the developer tools guides for the longer explanations.