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

Laravel Short Schedule Laravel Package

spatie/laravel-short-schedule

Schedule Laravel Artisan commands at sub-minute intervals (every second or even fractions). Define short schedules via ShortSchedule facade or Console Kernel. Note: Laravel now supports sub-minute scheduling, so this package is largely unnecessary.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy—this package eliminates the need to build a custom high-frequency scheduler from scratch, saving engineering time and reducing technical debt.
  • Feature Expansion: Enables real-time or near-real-time workflows (e.g., live analytics, IoT data processing, or high-frequency financial calculations) where Laravel’s native scheduler (limited to 1-minute intervals) is insufficient.
  • Roadmap Priorities:
    • High-priority: Use cases requiring sub-second execution (e.g., latency-sensitive systems, automated trading, or real-time notifications).
    • Low-priority: Standard cron-like tasks (use Laravel’s built-in scheduler or native cron).
  • Use Cases:
    • Automated Testing: Run test suites or validation checks every few seconds during CI/CD pipelines.
    • IoT/Edge Computing: Process sensor data or trigger actions at millisecond precision.
    • Gaming/Simulations: Synchronize game states or physics calculations across servers.
    • Financial Systems: Execute high-frequency trades or risk calculations.
    • Monitoring/Alerting: Poll APIs or systems more frequently than minute-based intervals allow.

When to Consider This Package

Adopt this package if:

  • You need sub-minute execution (e.g., every 0.5s, 1s, 5s, 30s) for Artisan commands or shell scripts.
  • Your use case cannot tolerate delays introduced by minute-based scheduling (e.g., real-time systems).
  • You’re using Laravel 9–13 (check compatibility; native Laravel 11+ sub-minute support may replace this for future projects).
  • You require constraints like:
    • Time windows (between()), environment-specific runs (environments()), or conditional execution (when()).
    • Overlap prevention (withoutOverlapping()) or single-server execution (onOneServer()).
  • You’re comfortable managing a persistent process (e.g., via Supervisor) for the scheduler.

Look elsewhere if:

  • You only need minute+ intervals (use Laravel’s native scheduler or cron).
  • Your team lacks DevOps expertise to deploy/manage a long-running process (e.g., Supervisor).
  • You’re on Laravel 11+ and can use native sub-minute scheduling.
  • Your commands have high memory usage (package includes a --lifetime flag, but frequent restarts may impact performance).
  • You need distributed locking across multiple servers (consider Redis-based solutions like spatie/laravel-queue-lock).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us automate critical, time-sensitive tasks—like real-time data processing or high-frequency trading—at sub-second intervals, which is impossible with standard Laravel scheduling. For example, we could:

  • Reduce latency in customer-facing systems by processing orders or updates instantly.
  • Cut costs by eliminating manual polling or third-party APIs for frequent checks.
  • Future-proof our tech stack by avoiding custom solutions that require ongoing maintenance. It’s a low-risk, high-reward investment: minimal dev effort, but massive operational efficiency gains for latency-sensitive workflows."*

Ask: "Which of our products or services would benefit from sub-second automation? (e.g., live dashboards, IoT, fintech, gaming?) Let’s prioritize those."


For Engineering:

*"This package solves a gap in Laravel’s scheduler: sub-minute execution for Artisan commands. Here’s why it’s worth adopting:

  • No reinventing the wheel: Uses ReactPHP for efficient event loops, handles memory leaks via --lifetime, and supports constraints (time windows, environments, etc.).
  • Seamless integration: Works like Laravel’s scheduler but with everySecond(), everySeconds(0.5), etc. Supports shell commands, events, and testing.
  • Production-ready: Designed for long-running processes (use Supervisor); includes features like withoutOverlapping() and onOneServer() for safety.
  • Future-proof: While Laravel 11+ has native sub-minute support, this package works across Laravel 9–13 and offers more flexibility (e.g., runInMaintenanceMode()).

Trade-offs:

  • Requires a persistent process (Supervisor).
  • Not ideal for high-memory commands (use --lifetime flag).
  • Overkill for tasks that can run hourly/daily.

Proposal:

  1. Pilot: Test with a latency-sensitive use case (e.g., a high-frequency analytics job).
  2. Deploy: Set up Supervisor for the short-schedule:run process.
  3. Monitor: Track performance and memory usage.

Alternatives:

  • Native Laravel 11+ scheduler (if upgrading).
  • Custom solution (higher maintenance).
  • Third-party tools (e.g., Celery, but adds complexity)."*

Ask: "Which of our time-sensitive workflows could benefit from this? Let’s pick one to prototype."

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.
redaxo/debug
redaxo/test
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
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