Weave 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

Laravel Smart Scheduler Laravel Package

jiordiviera/laravel-smart-scheduler

A Laravel package for smarter task scheduling: manage scheduled jobs with dynamic frequencies, overlap prevention, condition-based runs, and clear logging. Simplify cron management and keep recurring tasks predictable, organized, and easy to monitor.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

The package remains a Laravel-native scheduler wrapper: it hooks into the framework's task lifecycle, persists run state in an Eloquent model (ScheduleRun), and emits notifications through a contracted interface (SmartNotifierInterface). v1.1.0 deepens this fit rather than changing it — stuck detection is layered onto the existing SmartSchedulerManager pre-flight path, and the new isStuck() helper exposes state through the model rather than a new subsystem. For a TPM, this is the desirable shape: new capability arrives as state + artisan command + config toggle, all of which map onto conventions the team already operates.

The one architectural signal worth flagging is that the manager now performs a write (marking tasks STATUS_STUCK) before its overlap read. That is a behavioural change in the scheduling hot path, not just an additive feature.

Integration feasibility

Low-to-moderate effort. Additive surface is straightforward: two config keys (stuck_timeout_minutes, notify_on_stuck), one artisan command, one model helper, one mail template. No database migration is mentioned, but STATUS_STUCK implies an existing status column must accept the new value — confirm whether that column is an enum, a DB-level enum, or a plain string, as a constrained enum would require a migration the notes do not call out.

The genuine integration risk is the modified SmartNotifierInterface contract. Adding sendStuckNotification() to an interface is a breaking change for every in-house or third-party implementer, despite shipping under a minor version. Any team with a custom notifier (Slack, Teams, PagerDuty) will get a fatal error on upgrade until the method is implemented.

Technical risk

  • Contract break under a patch/minor version — highest-severity item; semver expectations are violated.
  • Silent behaviour change in overlap logic — previously, a long-running task blocked new runs; now it may be reclassified stuck and the new run allowed to proceed, which can produce concurrent execution for genuinely long jobs.
  • Default timeout of 60 minutes — arbitrary relative to real workloads; batch/import/report jobs exceeding an hour will be misclassified as stuck and generate false notifications from day one unless tuned.
  • Notification volume — stuck emails are per-task and uncontrolled by default beyond notify_on_stuck; a systemic failure (queue down, DB degraded) could fan out into a mail storm.
  • Observability gap — new status value must propagate to dashboards, alerting, and any query filtering on status, or reporting will silently undercount.

Key questions

  1. Is sendStuckNotification() a required interface method or is a default/trait provided? Determines whether the upgrade is blocking.
  2. Does STATUS_STUCK require a schema change, and is the status column string or enum?
  3. When auto-detection marks a task stuck, is the new execution permitted to start? What is the concurrency guarantee?
  4. Is stuck_timeout_minutes per-task overridable, or global only?
  5. Are stuck-email sends rate-limited, batched, or queued?
  6. Does --dry-run suppress state mutation as well as notifications?

Integration Approach

Stack fit

Requires Laravel with the standard scheduler and mail stack already in use. No new infrastructure dependencies. The artisan command fits existing ops runbooks (cron/supervisor-driven), so no new operational surface for platform teams.

Migration path

  1. Audit implementers first. Grep for SmartNotifierInterface implementations before touching the package. This is the gating step; everything else is additive.
  2. Verify schema flexibility for the status column; add a migration only if constrained.
  3. Implement sendStuckNotification() in every custom notifier — start with a no-op or log-only body to unblock the upgrade, then wire real channels.
  4. Set notify_on_stuck to false initially. Ship the detection capability without the notification blast radius, observe classification accuracy for one to two weeks, then enable.
  5. Tune stuck_timeout_minutes against actual p95/p99 runtimes before enabling notifications.

Compatibility

Upgrade is blocking for custom notifier implementers and non-blocking for consumers using the bundled notifier. Downstream compatibility risk sits in reporting: any dashboard, alert rule, or reconciliation query enumerating statuses needs STATUS_STUCK added or it will under-report.

Sequencing

Contract audit → schema check → notifier implementations → upgrade → detection enabled with notifications off → timeout calibration → notifications enabled → dashboards/alerts updated. Do not compress the calibration window; the default timeout is unlikely to match production runtimes.

Operational Impact

Maintenance

Ongoing cost is modest: one config value to tune, one command to schedule (or rely on the automatic in-path detection). The maintenance burden that matters is classification accuracy — an untuned timeout generates recurring false positives that erode trust in the alert channel, which is the classic failure mode for this class of feature.

Support

Support load will concentrate in two areas: (a) upgrade failures from the contract change, resolvable once with a documented implementer checklist; (b) "why was my task marked stuck" tickets, best pre-empted by documenting the timeout semantics and the auto-detection trigger in the internal runbook.

Scaling

Detection cost is a per-execution write plus a scan on the detect-stuck command. At high task volumes, the command should be run on a schedule with a bounded lookback window rather than as a full-table scan; validate query performance against the ScheduleRun table size before enabling in production. Notification fan-out is the more likely scaling limit — enforce a rate limit or digest before broad enablement.

Failure modes

  • False stuck classification on legitimately long jobs → spurious alerts, possible duplicate concurrent execution.
  • Notification storm during systemic degradation → mail quota exhaustion, on-call fatigue.
  • Upgrade hard-fail from unimplemented interface method → scheduler boot failure, affecting all task execution, not just stuck detection.
  • Reporting blind spot from unhandled STATUS_STUCK in dashboards.
  • Semver trap: teams treating a minor bump as safe will not audit implementers.

Ramp-up

Roughly half a day of engineering for the contract audit and notifier updates, plus a one-to-two week observation window with notifications disabled before enabling. The TPM decision worth making explicitly: treat v1.1.0 as a breaking change internally, despite its version number, and gate the rollout on the notifier audit completing rather than on the version bump appearing benign.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums