Skip to content

Name the position of an nth day of week - #719

Open
austek wants to merge 1 commit into
jmrozanec:masterfrom
austek:fix/issue_126
Open

Name the position of an nth day of week#719
austek wants to merge 1 commit into
jmrozanec:masterfrom
austek:fix/issue_126

Conversation

@austek

@austek austek commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #126

0 59 10 ? 1/2 MON#1 * described as at 10:59 every 2 months from month 1 Monday 1 of every month. The nth day of week printed its position as a bare number, and claimed of every month right after the month field had restricted it to every second month.

The # and L day of week forms now get their own phrasing:

expression before after
0 59 10 ? 1/2 MON#1 * at 10:59 every 2 months from month 1 Monday 1 of every month at 10:59 every 2 months from month 1 on the first Monday of the month
0 0 0 ? * MON#3 at 00:00 Monday 3 of every month at 00:00 on the third Monday of the month
0 0 0 ? * 6L at 00:00 last Friday of every month at 00:00 on the last Friday of the month

New base bundle keys on_nth_day_of_week_x, on_last_day_of_week_x and nth_1..nth_5. Positions past the fifth are outside the Quartz range but reachable through the generic descriptor, so they fall back to the plain number.

Field order is untouched, so the day of week still follows the month rather than leading the sentence as the report suggests.

Covered by Issue126Test over all five positions, both L spellings and the reported expression; the two CronDescriptorTest assertions on the old wording are updated.

"0 59 10 ? 1/2 MON#1 *" read "at 10:59 every 2 months from month 1 Monday 1 of
every month". The nth day of week printed its position as a bare number, and
claimed "of every month" right after the month field had restricted it to every
second month.

Give the # and L forms their own phrasing, so they read "on the first Monday of
the month" and "on the last Friday of the month" and no longer contradict a
restricted month. Positions past the fifth, outside the Quartz range but
reachable through the generic descriptor, fall back to the plain number.

Field order is untouched, so the day of week still follows the month rather
than leading the sentence as the report suggests.

Fixes jmrozanec#126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect description for 0 59 10 ? 1/2 MON#1 *

1 participant