schedule-artisan-task
Installation
SKILL.md
Schedule Artisan Task
When To Use
Use this skill when introducing cron-like tasks, scheduling cleanups, syncing data on intervals, or testing scheduler rules.
Workflow
- Locate schedule entrypoint: Open
routes/console.php. - Define task schedule: Use
Schedule::command()orSchedule::job(). - Prevent concurrency: Chain safety methods (
withoutOverlapping(),onOneServer()). - Log output: Enforce logging of failures using
onFailure().