About laravel-task-scheduling
A Laravel skill for defining scheduled tasks and keeping their execution predictable across environments. It covers overlap prevention, single-server execution, observability, and feature flags for risky jobs.
Key features
- 01Schedule commands in routes/console.php
- 02Prevent overlapping runs
- 03Limit execution to one server
- 04Log and monitor task runs
- 05Use config flags for risky jobs
Use cases
- 01Scheduling a daily report command
- 02Avoiding duplicate work across multiple nodes
- 03Tracking failures in scheduled jobs
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ noartem/ skills --skill laravel-task-schedulingAfter installing, type/laravel-task-schedulingin Claude Code to confirm it loaded.
Details
From the project READMETask Scheduling
Run scheduled tasks predictably across environments.
Commands
// routes/console.php
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schedule;
Schedule::command('reports:daily')
->dailyAt('01:00')
->withoutOverlapping()
->onOneServer()
->runInBackground()
->evenInMaintenanceMode();
Patterns
- Guard long-running commands with
withoutOverlapping() - Use
onOneServer()when running on multiple nodes - Emit logs/metrics for visibility; consider notifications on failure
- Feature-flag risky jobs via config/env
Comments
Markdown supported