Skip to content

Extended serialization for cron fields #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 11, 2025

Conversation

harrisiirak
Copy link
Owner

@harrisiirak harrisiirak commented May 11, 2025

This PR improves several aspects of expression serialization:

  • Supports nth-day (#) serialization
  • Retains ? in serialized cron expressions

It also includes some minor BREAKING CHANGES:

  • The CronField constructor signature has changed. Instead of the wildcard boolean argument, it now takes a full-fledged CronFieldOptions object.
  • The nthDayOfWeek option (which was undocumented or inconsistently used) has been removed from CronExpressionOptions.

These changes shouldn't affect most users, but caution is advised when working directly with CronField-related APIs.

Fixes #358 and #349

@harrisiirak harrisiirak added this to the v5.2.0 milestone May 11, 2025
@harrisiirak harrisiirak merged commit 2b2af27 into master May 11, 2025
6 checks passed
@harrisiirak harrisiirak deleted the improvement/extended_serialization branch May 20, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parseExpression() loses ? information
1 participant