laravel:task-scheduling

Configure Laravel cron jobs with overlapping prevention and single-server execution.

1|Updated Sep 22, 2025
One-click install
npx skills add https://github.com/meistro57/chat_bridge --skill laravel-task-scheduling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel:task-scheduling
Source: https://github.com/meistro57/chat_bridge/tree/main/.claude/skills/task-scheduling
Command: npx skills add https://github.com/meistro57/chat_bridge --skill laravel-task-scheduling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that scheduled tasks within a Laravel application are executed reliably and predictably, preventing overlapping runs and managing execution across multiple servers.

Core Features & Use Cases

  • Prevent Overlapping Jobs: Use withoutOverlapping() to ensure a task doesn't run multiple times concurrently.
  • Server Coordination: Employ onOneServer() for tasks that should only run on a single server in a distributed environment.
  • Maintenance Mode Handling: Configure tasks to run even when the application is in maintenance mode using evenInMaintenanceMode().
  • Use Case: Schedule a daily report generation command that must complete before the next day's report is due, ensuring no two report generations overlap.

Quick Start

Configure the daily report command to run at 1 AM daily, ensuring it does not overlap with previous runs and executes on only one server.

Frequently Asked Questions about laravel:task-scheduling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent overlapping cron jobs in a Laravel application?

To prevent overlapping cron jobs in Laravel, use the `withoutOverlapping()` method when scheduling tasks. This ensures a scheduled task does not run multiple times concurrently, keeping execution reliable and predictable.

How do I ensure a scheduled task only runs on one server in a distributed Laravel environment?

To ensure a scheduled task only runs on one server in a distributed Laravel environment, use the `onOneServer()` method. This coordinates cron job execution across multiple server instances so the task fires once.

Can I run Laravel scheduled tasks while the application is in maintenance mode?

Yes, you can run Laravel scheduled tasks during maintenance mode by configuring them with `evenInMaintenanceMode()`. This allows specific scheduled tasks to execute even when the application is unavailable to users.

What is the best way to schedule a daily report generation command in Laravel without concurrent runs?

The best way to schedule a daily report generation command in Laravel without concurrent runs is to combine a daily schedule with `withoutOverlapping()`. This ensures the current report completes before the next one starts.

Why does my Laravel task scheduler run the same job multiple times across different servers?

Your Laravel task scheduler runs the same job multiple times across servers because it lacks single-server coordination. Applying `onOneServer()` restricts the scheduled task execution to a single server instance in a distributed setup.

Do I need a separate dependency to manage cron job scheduling safely in Laravel?

No, you do not need a separate dependency to manage cron job scheduling safely in Laravel. The framework provides built-in scheduling methods to handle overlapping prevention and server coordination natively.