noartem

laravel-task-scheduling

1
0
# Install this skill:
npx skills add noartem/skills --skill "laravel-task-scheduling"

Install specific skill from multi-skill repository

# Description

Schedule tasks with safety; use withoutOverlapping, onOneServer, and visibility settings for reliable cron execution

# SKILL.md


name: laravel-task-scheduling
description: Schedule tasks with safety; use withoutOverlapping, onOneServer, and visibility settings for reliable cron execution


Task 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

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.