beyondbluesky/cron-manager-bundle
artisan schedule is more opinionated and tightly coupled to Laravel’s task scheduling.Symfony\Component\DependencyInjection polyfills).schedule:run is file-based (app/Console/Kernel.php), so migrating to this bundle would require schema changes or a dual-configuration system.Process component for cron job execution. Laravel’s Artisan::call() or Process facade could replace this with minimal effort.schedule() method chaining.artisan schedule) or packages like spatie/scheduler been considered?schedule() vs. shell scripts).// app/Providers/CronManagerProvider.php
use BeyondBlueSky\CronManagerBundle\DependencyInjection\CronManagerExtension;
class CronManagerProvider extends ServiceProvider {
public function register() {
$this->app->singleton('cron.manager', function () {
$container = new Symfony\Component\DependencyInjection\ContainerBuilder();
$container->registerExtension(new CronManagerExtension());
// Load config from Laravel's config/cron.php
return new CronManager($container);
});
}
}
schedule() calls to YAML/XML (or keep DB-based if needed).config/cron.yml):
jobs:
send_daily_report:
command: "php artisan reports:generate"
schedule: "0 9 * * *"
user: "www-data"
artisan schedule:run with a custom Artisan command that delegates to the bundle.// app/Console/Commands/RunCronJobs.php
use BeyondBlueSky\CronManagerBundle\Manager\CronManager;
class RunCronJobs extends Command {
protected $cronManager;
public function __construct(CronManager $cronManager) {
$this->cronManager = $cronManager;
}
public function handle() {
$this->cronManager->run();
}
}
Process component to test job execution.| Feature | Laravel Native | BeyondBlueSky Bundle | Workaround Needed? |
|---|---|---|---|
| Time-based scheduling | ✅ Yes | ✅ Yes | No |
| Queue-based jobs | ✅ Yes | ❌ No | Use Laravel queues separately |
| Event listeners | ✅ Yes | ✅ Yes | Adapter for Symfony events |
| Database storage | ❌ No | ✅ Yes | Custom migration |
| Process management | ✅ (Artisan) | ✅ (Symfony Process) | Replace with Laravel Process |
schedule:run in favor of custom command.Process may behave differently than Laravel’s Artisan::call() (e.g., output handling, timeouts).failed_jobs table for recovery alongside bundle logs.Process may be less efficient than Laravel’s optimized Artisan calls.schedule:run with retries).| Failure Scenario | Impact | Mitigation Strategy |
|---|---|---|
| Symfony DI misconfiguration | Jobs fail silently | Use Laravel’s bootstrap/app.php to validate DI |
| Process crashes | Jobs not executed | Implement health checks + alerts |
| Database config corruption | Cron table broken | Backup config + rollback scripts |
| Timezone misalignment | Jobs run at wrong time | Enforce UTC in config + tests |
How can I help you explore Laravel packages today?