Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cron Expression Laravel Package

dragonmantank/cron-expression

Parse and evaluate PHP cron expressions with advanced features like ranges, intervals, weekdays (W), last days (L), and nth occurrences (#). Easily check if a cron job is due, calculate next/previous run dates, and skip multiple matches. Supports complex expressions like */12, 2-59/3, and @daily—ide...

View on GitHub
Deep Wiki
Context7
v3.5.0

What's Changed

New Contributors

Full Changelog: https://github.com/dragonmantank/cron-expression/compare/v3.4.0...v3.5.0

v3.4.0

What's Changed

New Contributors

Full Changelog: https://github.com/dragonmantank/cron-expression/compare/v3.3.3...v3.4.0

v3.3.3

[3.3.3] - 2024-08-10

Added

  • N/A

Changed

  • N/A

Fixed

v3.3.2

[3.3.2] - 2022-09-19

Added

  • N/A

Changed

  • Skip some daylight savings time tests for PHP 8.1 daylight savings time weirdness (#146)

Fixed

  • Changed string interpolations to work better with PHP 8.2 (#142)
v3.3.1

[3.3.1] - 2022-01-18

Added

  • N/A

Changed

  • N/A

Fixed

  • Fixed issue when timezones had no transition, which can occur over very short timespans (#134)
v3.3.0

[3.3.0] - 2022-01-13

Added

  • Added ability to register your own expression aliases (#132)

Changed

  • Changed how Day of Week and Day of Month resolve when one or the other is * or ?

Fixed

  • PHPStan should no longer error out
v3.2.4

[3.2.4] - 2022-01-12

Added

  • N/A

Changed

  • Changed how Day of Week increment/decrement to help with DST changes (#131)

Fixed

  • N/A
v3.2.3

[3.2.3] - 2022-01-05

Added

  • N/A

Changed

  • Changed how minutes and hours increment/decrement to help with DST changes (#131)

Fixed

  • N/A
v3.2.2

[3.2.2] - 2022-01-05

Added

  • N/A

Changed

  • Marked some methods [@internal](https://github.com/internal) (#124)

Fixed

  • Fixed issue with small ranges and large steps that caused an error with range() (#88)
  • Fixed issue where wraparound logic incorrectly considered high bound on range (#89)
v3.2.1

[3.2.1] - 2022-01-04

Added

  • N/A

Changed

  • Added PHP 8.1 to testing (#125)

Fixed

  • Allow better mixture of ranges, steps, and lists (#122)
  • Fixed return order when multiple dates are requested and inverted (#121)
  • Better handling over DST (#115)
  • Fixed PHPStan tests (#130)
v3.2.0

[3.2.0] - 2022-01-04

Added

  • Added alias for [@midnight](https://github.com/midnight) (#117)

Changed

  • Improved testing for instance of field in tests (#105)
  • Optimization for determining multiple run dates (#75)
  • CronExpression properties changed from private to protected (#106)

Fixed

  • N/A
v3.1.0

[3.1.0] - 2020-11-24

Added

  • Added CronExpression::getParts() method to get parts of the expression as an array (#83)

Changed

  • Changed to Interfaces for some type hints (#97, #86)
  • Dropped minimum PHP version to 7.2
  • Few syntax changes for phpstan compatibility (#93)

Fixed

  • N/A

Deprecated

  • Deprecated CronExpression::factory in favor of the constructor (#56)
  • Deprecated CronExpression::YEAR as a formality, the functionality is already removed (#87)
v3.0.2

[3.0.2] - 2020-10-12

Added

  • Added support for PHP 8 (#92)

Changed

  • N/A

Fixed

  • N/A
v2.3.1

[2.3.1] - 2020-10-12

Added

  • Added support for PHP 8 (#92)

Changed

  • N/A

Fixed

  • N/A
3.0.1

Fixed

  • Cast step to an int as part of calling range(), see #80
  • Added missing check for ? in DOM and DOW, see #76
v3.0.0

MAJOR CHANGE - In previous versions of this library, setting both a "Day of Month" and a "Day of Week" would be interpreted as an AND statement, not an OR statement. For example:

30 0 1 * 1

would evaluate to "Run 30 minutes after the 0 hour when the Day Of Month is 1 AND a Monday" instead of "Run 30 minutes after the 0 hour on Day Of Month 1 OR a Monday", where the latter is more inline with most cron systems. This means that if your cron expression has both of these fields set, you may see your expression fire more often starting with v3.0.0.

Added

  • Additional docblocks for IDE and documentation
  • Added phpstan as a development dependency
  • Added a Cron\FieldFactoryInterface to make migrations easier (#38)

Changed

  • Changed some DI testing during TravisCI runs
  • \Cron\CronExpression::determineTimezone() now checks for \DateTimeInterface instead of just \DateTime
  • Errors with fields now report a more human-understandable error and are 1-based instead of 0-based
  • Better support for \DateTimeImmutable across the library by typehinting for \DateTimeInterface now
  • Literals should now be less case-sensative across the board
  • Changed logic for when both a Day of Week and a Day of Month are supplied to now be an OR statement, not an AND

Fixed

  • Fixed infinite loop when determining last day of week from literals
  • Fixed bug where single number ranges were allowed (ex: 1/10)
  • Fixed nullable FieldFactory in CronExpression where no factory could be supplied
  • Fixed issue where logic for dropping seconds to 0 could lead to a timezone change
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation