carles/scheduled-command-bundle
Pros:
at)..env or config/ files with minimal effort.Cons:
at command, which is not natively available on Windows or some shared hosting environments (e.g., cPanel). This could limit deployment flexibility.Laravel Compatibility:
at) could be abstracted into a Laravel service, but Doctrine dependencies would need replacement (e.g., Eloquent models, Laravel’s event system).ScheduledCommand persistence.scheduled_command.create → custom Laravel event).at command execution via Laravel’s process utilities (e.g., Symfony/Process or Laravel\Process).artisan schedule (cron) or queue workers. This bundle offers no unique advantage unless at-specific features (e.g., one-time delayed jobs) are critical.Technical Risk:
app/Console/Kernel.php) or queue system?at-command features (e.g., dynamic delays) that justify the integration?at is unavailable (e.g., shared hosting)?at-specific scheduling (e.g., no cron access)?Bus or Schedule facade meet the same needs with lower risk?at (e.g., legacy system dependencies)?Laravel Alignment:
cron is restricted but at is available.Schedule facade (cron-based).delay().spatie/scheduled-task (more maintained).Tech Stack Requirements:
at command. Requires containerization (Docker) or cloud provider (AWS, GCP) with Unix-based instances.Schedule or queues.at command availability in target environments (e.g., which at in CI/CD).Event::dispatch()).Symfony/Process to execute at commands.ScheduledCommand model:
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Process;
class ScheduledCommand extends Model {
protected $fillable = ['command', 'datetime'];
public function schedule() {
$process = new Process(['at', $this->datetime->format('H:mm'), $this->command]);
$process->run();
return $process->getOutput();
}
}
at jobs on ScheduledCommand creation.at is unavailable).php-compat) or patch the bundle.at-unavailable environments require fallback logic (e.g., queue-based delays).at availability (e.g., Docker with Unix-based images).php artisan schedule:at).at job success/failure rates.Schedule if at becomes unreliable.at updates or fallbacks).at command reliability (e.g., system updates breaking at).at command version and system libraries (e.g., libat on Linux).at is misconfigured or unavailable.at jobs are opaque (no built-in logging). Requires custom logging (e.g., log at job IDs to database).at).at command availability.at fails, use php artisan queue:work").at has system-wide limits (e.g., max jobs per user). Not suitable for high-volume scheduling.at queue length (e.g., atq shows pending jobs).at is a system-level service; scaling requires more at servers or alternative solutions (e.g., distributed task queues).delay().| Failure Scenario | Impact | Mitigation | |------------------------------------|-------------------------------------
How can I help you explore Laravel packages today?