Part of theAutomation Suite ⟶
CRON
Cron ExamplesQuick lookup for real workloads
Detail view · standard & Quartz
← Back to library

Last weekday of month at 18:00

This page gives a visual schedule, field-by-field explanation, and multi-platform code examples for 0 18 28-31 * 1-5. You'll also see a Quartz-style variant for systems like AWS EventBridge and enterprise schedulers.

Important caveats for this cron expression

  • In most 5-field cron implementations, day-of-month and day-of-week are combined with OR, not AND. This schedule may run on any day matching either field.
  • This approximates “last weekday of the month” using 28–31 and Mon–Fri. Because day-of-month and day-of-week are OR, it can produce extra runs and is not a perfect “last weekday” rule.

These notes come from how most 5-field cron implementations behave in practice. Always test schedules in your own scheduler before relying on them for business-critical jobs.

Cron summary0 18 28-31 * 1-5 runs at 18:00 on weekdays.

This expression is commonly used for schedules like last weekday of month at 18:00. On this page you'll find a visual calendar, a field-by-field breakdown, example code for popular platforms, and answers to common cron questions.

Standard0 18 28-31 * 1-5
Quartz0 0 18 LW * ?

How this cron schedule works

In standard 5-field cron, the expression is minute hour day-of-month month day-of-week. For 0 18 28-31 * 1-5, that means:

  • Minute: 0 At minute 0
  • Hour: 18 At hour 18
  • Day of month: 28-31 On days 28-31 of the month
  • Month: * Every month
  • Day of week: 1-5 Weekdays (Mon–Fri)

Many cron implementations treat day-of-month and day-of-week as a logical OR, which can surprise people when they expect "the second Sunday" or "the last weekday of the month". Where that matters, we flag it and show a Quartz-style alternative.

Visual schedule

The calendar below highlights the days in the current month (UTC) when this cron expression can fire. The minute bar shows which minutes of the hour are active.

Loading calendar…
● = at least one run on that day
Computing calendar…
Minute timeline (0–59)At minute 0
Active minutes shown in .
015304559

Cron field breakdown

This table describes each cron field in 0 18 28-31 * 1-5 using simple language. It's useful when you're teaching cron to someone else or double-checking that the schedule matches what you had in mind.

FieldValueMeaning
Minute0At minute 0
Hour18At hour 18
Day of Month28-31On days 28-31 of the month
Month*Every month
Day of Week1-5Weekdays (Mon–Fri)

Upcoming runs (UTC)

The list below shows the next few times this expression will fire in UTC according to a typical cron implementation. Your actual runtime may use a different timezone, so always check the scheduler configuration in production.

No upcoming times (invalid expression or finished schedule).

Typical use cases

Developers often use this cron expression for recurring automation in background jobs, batch processing, and infrastructure tasks. Here are some realistic examples:

  • Scheduling recurring maintenance jobs or health checks.
  • Running ETL or data sync jobs on a predictable cadence.
  • Triggering emails, reports, or notifications at regular times.

Common equivalents & variants

Many teams experiment with nearby schedules when tuning load or latency requirements. These related cron expressions are frequently used alongside 0 18 28-31 * 1-5.

Tip: many platforms accept 0/15 and */15 equivalently for "every 15 minutes". Always check your scheduler's documentation for subtle differences.

Multi-system code examples

The same schedule can be expressed slightly differently depending on the system you use. Use the tabs below to see how 0 18 28-31 * 1-5 maps to common schedulers.

Standard cron
# crontab (UTC)
0 18 28-31 * 1-5 /path/to/your/script.sh

Convert this cron expression

Quickly convert between standard 5-field cron and a 6-field Quartz-style expression. This is useful for platforms like AWS EventBridge that require seconds and ? placeholders.

→ Quartz:0 0 18 ? * ?
JAMS SchedulerEnterprise workload automation for cron-heavy teams

Run 0 18 28-31 * 1-5 like it's production-critical.

Cron is great for quick jobs, but it doesn't give you dependencies, retries, calendars, or visibility. JAMS Scheduler keeps cron's simplicity while adding timelines, alerts, audit history, and event-based triggers across platforms.

  • Import existing cron schedules into a single view.
  • Add dependencies, calendars, and retries without changing code.
  • Trigger jobs on file drops, APIs, or upstream completion.

FAQ

What does this cron expression mean?

Last weekday of month at 18:00. In plain English, this schedule runs at 18:00 on weekdays. The minute, hour, day-of-month, month, and day-of-week fields work together to decide when the job is allowed to execute.

Is this valid on Quartz or EventBridge?

Yes, you can use a Quartz-style equivalent like 0 0 18 LW * ?. Some systems require a 6- or 7-field format with seconds and a ? value where a day field is not used. Always verify the exact syntax for your platform.

What timezone does this cron use?

The examples on this page show upcoming run times in UTC. Real schedules usually run in the timezone configured by your scheduler (system cron, Kubernetes, GitHub Actions, etc.). Double-check this before relying on local clock times like 09:00 or midnight.

Why does this sometimes run on extra days?

In 5-field cron, day-of-month and day-of-week are evaluated as a logical OR in many implementations. That means a schedule like 30 1 8-14 * 0 can run both on the 8–14th of the month and on any Sunday in that range. If you need "exactly the 2nd Sunday", consider a Quartz expression like 0 30 1 ? * SUN#2 instead.

Explore more cron expressions

If you're still designing your schedule, these related cron patterns are a good starting point. They cover the most common "every X" and day-of-week schedules developers search for.