xactsystems/command-scheduler
Schedule Artisan commands in Laravel without cluttering your Kernel.php. Define command schedules via attributes or config, with support for intervals, constraints, and runtime management. A lightweight, expressive alternative to Laravel's task scheduler for cleaner, more maintainable console schedu...
composer require <vendor>/<package>; Laravel package auto-discovery registers the service provider, so no manual wiring is usually needed.php artisan vendor:publish --tag=... then php artisan migrate). The package creates a history table backing the ScheduledCommandHistory model.php artisan schedule:work locally, cron + schedule:run in production). History is only recorded for commands executed through the scheduler, not for ad-hoc php artisan <command> invocations.ScheduledCommandHistory::latest()->first() in Tinker and check the recorded command, exit code, timestamps, duration, and captured output. That single query answers the most common day-to-day question — "did last night's job actually run, and did it succeed?"ScheduledCommandHistory model (in v5 it is configured with PHP attributes rather than class properties), the package config file (table name, model override, retention), and the published migration to understand the schema you'll be querying.ScheduledCommandHistory and point the config at your subclass. Because v5 configures the base model via attributes, mirror those attributes on your subclass or you'll lose table/fillable/connection settings that used to be inherited from properties.Schedule::fake() / event fakes to assert commands are scheduled, and seed history rows directly to test your alerting/dashboard code. If your test container binds Doctrine services, note that v5.0.6 specifically resolves a Doctrine service injection problem in the package's own tests — mirror that container setup if you copied their test scaffolding.ScheduledCommandHistory, Doctrine injection fix). It is safe to bump, but the attribute refactor is a signal: if you extended the model in a v4-style (properties) codebase, re-verify your subclass still resolves the right table and fillable fields.0 = success, 127 = command not found, 126 = permission denied. Alert on the code; use output as context.withoutOverlapping. Skipped runs may not appear as failures — decide explicitly whether skipped executions should surface in your alerting, otherwise genuinely stuck jobs can look healthy.started_at/finished_at against a known timezone; mixing app timezone and UTC is an easy source of off-by-hours alerting bugs.How can I help you explore Laravel packages today?