toflar/cronjob-supervisor
Run and cap background workers using only a minutely cronjob—no supervisord needed. Define commands with desired concurrency; the supervisor tracks running processes and prevents overspawning across minutes via ps/tasklist/flock providers, working on Linux and Windows.
schedule:run + queues for complex async workflows.fcron).spatie/scheduled-task (with Laravel queues) be a better fit?JobExecuted events).* * * * * format.Artisan commands or callables..env and config/cronjob-supervisor.php.php artisan vendor:publish --provider="Toflar\CronjobSupervisor\CronjobSupervisorServiceProvider").php artisan cronjob:run with a test job scheduled every 30 seconds. Log execution timestamps to measure precision.php artisan cronjob:run (replace existing entries).sleep_precision in config if needed (default should suffice for most cases).JobExecuted events can now include timestamps for analysis.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Bounded sleep causes CPU spikes | Server instability | Test under load; adjust sleep_precision. |
| Job timing drifts due to external | Inconsistent execution | Use external monitoring (e.g., cronitor). |
| Package bug in precision logic | Timing corruption | Roll back to v2.1.2; fork if critical. |
| High-frequency jobs overload server | Degraded performance | Throttle jobs; use queues for parallel tasks. |
How can I help you explore Laravel packages today?