skywarth/chaotic-schedule
Generate random, realistic cron schedules and intervals in PHP and Laravel. Chaotic Schedule makes it easy to fake unpredictable schedule frequencies for tests, seeders, demos, and load simulations, with constraints for hours, days, and expressions.
randomDays, randomTimeSchedule, RandomDateScheduleBasis::WEEK|MONTH|YEAR) usable for workload distribution, staggered notifications, and realistic test fixtures.(uniqueIdentifier, basisDate, periodType) always yields the same runs) is the non-obvious value; reproducing that correctly in-house is more effort than adopting a small macro package. Lean adopt.Adopt when:
Look elsewhere / stay on v2.x when:
^2.0 and schedule the upgrade.getString(), getDayCount(), validate(), isValid(), getAll()); migrate to enum cases / cases() / tryFrom() / ->periodString().InvalidScheduleBasisProvided or broad catch (\Exception $e) around these calls. v3 raises TypeError, which extends \Error, not \Exception — widen to catch (\Throwable $e) or a typed catch (\TypeError $e), otherwise invalid input will escape your error handling.Compatibility note for planning: macro names, parameter order, and behavior are unchanged, and seed determinism is preserved, so existing schedules will not drift across v2 → v3. The upgrade risk is concentrated in the version floor and error-handling surface, not in scheduling output.
To executives: A low-cost reliability lever. It de-synchronizes recurring jobs so traffic and job load spread out instead of spiking, reducing incident risk and peak infrastructure pressure. Cost is effectively zero beyond a routine platform upgrade we already need to make.
To engineering: One small, well-scoped package that adds deterministic randomized scheduling as a Laravel macro. The v3 upgrade is mostly a version-floor bump — public API and generated schedules are stable. Two concrete migration tasks: (1) confirm PHP 8.3 / Laravel 13 readiness before bumping, and (2) audit any catch (\Exception) or reliance on InvalidScheduleBasisProvided around these calls, since invalid values now raise TypeError (\Error, not \Exception). Teams not yet on the floor should stay on v2.x — no functional loss.
Recommendation: Approve adoption contingent on the PHP 8.3 / Laravel 13 platform upgrade; sequence the exception-handling audit into the same change window.
How can I help you explore Laravel packages today?