Task Scheduling
The Laravel Command Scheduler allows you to fluently and expressively define your command schedule within Laravel itself.
🧱 The LaraKube CLI Strategy​
In a Kubernetes environment, running a traditional cron daemon can be complex. LaraKube CLI simplifies this by creating a dedicated CronJob resource:
- Isolated Runner: Scheduling runs in its own lightweight pod, separate from your web workers.
- Deterministic Execution: It triggers
php artisan schedule:runevery minute, exactly as Laravel expects. - Resource Efficient: The pod only exists for the duration of the scheduled task, saving cluster memory and CPU.
Configuration​
There is no extra configuration needed in Kubernetes! Simply define your schedule in routes/console.php (Laravel 11+) or app/Console/Kernel.php (Legacy), and LaraKube CLI handles the rest.
Logs​
To see the output of your scheduled tasks, you can use the K9s console (larakube console) or check the logs of the most recent scheduler pod.