Cron · Traps

0 0 22-28 * 5

The 'fourth Friday of the month' trap

At midnight on the 22nd-28th of every month and on every Friday.

Runs per year (2027)125
Time of day00:00

Open in the explainer

Looks like 'the Friday that falls on the 22nd-28th'. Unix cron runs it on the 22nd-28th AND on every Friday. Even read as both, it's the fourth Friday, which isn't always the last one; Quartz and AWS write the last Friday as 6L, Spring as FRIL.

Next run times

  1. Calculating…

Field by field

FieldValueMeans
Minute (0-59)0:00
Hour (0-23)000:xx
Day of month (1-31)22-2822nd, 23rd, 24th, 25th, 26th, 27th and 28th
Month (1-12)*every month
Day of week (0-7, 0 and 7 = Sunday)5Friday

The same schedule on other platforms

PlatformWrite it asNotes
Linux crontab0 0 22-28 * 5 /path/to/script.shRuns in the server's time zone.
Kubernetes CronJobschedule: "0 0 22-28 * 5"Add timeZone: "Etc/UTC" (or any tz name) under spec; without it, the controller's time zone is used.
GitHub Actions- cron: '0 0 22-28 * 5'Runs in UTC unless you add timezone: under the cron line. Runs can be delayed, especially at the start of the hour.
Jenkinscron('0 0 22-28 * 5')Same five fields. Jenkins recommends H to spread load: H 0 22-28 * 5 runs at the same rate but at a minute picked from the job name. Different meaning: Jenkins requires the day of month and the weekday to match, so this runs 12 times a year (e.g. Fri 22 Jan, Fri 26 Feb, Fri 26 Mar).
Quartzn/aCan't be written as one expression: it needs both day fields, and one of them must be ?. Use two triggers (one per day field).
AWS EventBridgen/aCan't be written as one expression: it needs both day fields, and one of them must be ?. Use two rules (one per day field).
Spring @Scheduled@Scheduled(cron = "0 0 0 22-28 * FRI")Seconds come first. Different meaning: Spring matches every field, so both the day and the weekday must match (12 runs a year).
Azure Functions0 0 0 22-28 * 5Seconds come first. Runs in UTC unless the app setting WEBSITE_TIME_ZONE is set. Different meaning: Azure's NCrontab library checks the day and the weekday (12 runs a year).
systemd timerOnCalendar=Fri *-*-* 00:00:00
OnCalendar=*-*-22,23,24,25,26,27,28 00:00:00
Two lines reproduce cron's either-day rule (a timer may list several OnCalendar=). A single Fri *-*-22..28 … line would mean both.

Schedulers also differ in day-of-week numbering, time zones, special characters like L and ?, and what happens when the clocks change. Every one is compared, with links to its official docs, in the cron dialect registry.

The same local time on a UTC scheduler

GitHub Actions (by default), AWS EventBridge rules and Azure Functions (by default) read the schedule in UTC. To fire at the local time 0 0 22-28 * 5 describes, use the UTC expression for your zone. Zones with daylight saving time need a different expression in summer, so either switch twice a year or use a scheduler with a time zone setting (Kubernetes timeZone, Azure WEBSITE_TIME_ZONE, a time zone on the GitHub schedule).

Local time zoneWinter (Jan)Summer (Jul)
America/New_York0 5 22-28 * 50 4 22-28 * 5
America/Los_Angeles0 8 22-28 * 50 7 22-28 * 5
Europe/London0 0 22-28 * 5can't be written as one expression

Each UTC expression was checked to fire at the same instants as the local schedule for a whole year at that season's offset.

Watch out for

Day of month OR day of week, not AND

When both day fields are set, Unix cron runs the job when either matches. Here that means the 22nd, 23rd, 24th, 25th, 26th, 27th and 28th of the month plus every Friday: 125 runs in 2027.

If you meant only the days that satisfy both (12 a year, e.g. Fri 22 Jan, Fri 26 Feb, Fri 26 Mar), keep one field in the schedule and test the other inside the command. In a crontab, % must be escaped as \%:

0 0 22-28 * * [ "$(date +\%u)" = "5" ] && /path/to/script.sh

Jenkins, Spring, Azure Functions and a single systemd OnCalendar line all require both fields to match, so the same text means something different there (see the table above).

Related schedules

Step-by-step guide: Cron day-of-week numbers. All schedules: common cron expressions. Checking a whole crontab file? Use the crontab checker.

Sources

Run times were checked against an independent cron library (croniter) and this site's engine; every platform version above was parsed and compared run-for-run, and the systemd line was checked with systemd-analyze calendar. Last verified 18 November 2026.