PHPackages                             trogers1884/laravel-schedule-mgt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. trogers1884/laravel-schedule-mgt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

trogers1884/laravel-schedule-mgt
================================

A Laravel package for managing scheduled tasks through file storage

V1.1.0(1y ago)05MITPHPPHP ^8.1

Since Dec 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/trogers1884/laravel-schedule-mgt)[ Packagist](https://packagist.org/packages/trogers1884/laravel-schedule-mgt)[ RSS](/packages/trogers1884-laravel-schedule-mgt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (4)Used By (0)

Laravel Schedule Management
===========================

[](#laravel-schedule-management)

A Laravel package for managing scheduled tasks through file storage, allowing dynamic configuration of Laravel's task scheduler without code changes.

Features
--------

[](#features)

- Manage scheduled tasks without modifying code
- Store task configurations in JSON files
- Toggle tasks on/off without deployment
- Add custom parameters and constraints to scheduled tasks
- Command-line interface for task management
- No database dependencies required

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 10.0 or higher

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require trogers1884/laravel-schedule-mgt
```

The package will automatically register its service provider.

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag="schedule-mgt-config"
```

This will create a `config/schedule-mgt.php` file with the following contents:

```
return [
    'storage_path' => storage_path('app/schedule-mgt'),
    'file_format' => 'json',
];
```

Laravel Version-Specific Setup
------------------------------

[](#laravel-version-specific-setup)

### Laravel 11

[](#laravel-11)

Add to your `routes/console.php`:

```
use Trogers1884\LaravelScheduleMgt\ScheduleManager;

ScheduleManager::schedule();
```

### Laravel 10

[](#laravel-10)

Add to your `app/Console/Kernel.php` in the `schedule` method:

```
use Trogers1884\LaravelScheduleMgt\ScheduleManager;

protected function schedule(Schedule $schedule)
{
    ScheduleManager::schedule();
}
```

### Important Notes

[](#important-notes)

- For Laravel 10 and above, ensure your `config/app.php` has the package service provider if it's not auto-discovered: ```
    'providers' => [
        // ...
        Trogers1884\LaravelScheduleMgt\ScheduleMgtServiceProvider::class,
    ],
    ```

Usage
-----

[](#usage)

### Managing Tasks via Console Commands

[](#managing-tasks-via-console-commands)

#### List All Tasks

[](#list-all-tasks)

```
php artisan schedule:list
```

#### Add a New Task

[](#add-a-new-task)

```
phpphp artisan schedule:add "command:name" \    # Note: The first argument is now 'task' internally
    --frequency=daily \
    --parameters='["--param1", "value1"]' \
    --freq-parameters='["21:00"]' \
    --constraints='[{"method":"environments", "parameters":["production"]}]'
```

Options:

- First argument: The artisan command to schedule
- `--frequency`: The scheduling frequency (daily, hourly, weekly, etc.)
- `--parameters`: JSON array of command parameters
- `--freq-parameters`: JSON array of frequency method parameters
- `--constraints`: JSON array of additional scheduling constraints
- `--inactive`: Set the task as inactive initially

#### Toggle Task Status

[](#toggle-task-status)

```
php artisan schedule:toggle 1 --active=0
```

#### Remove a Task

[](#remove-a-task)

```
php artisan schedule:remove 1
```

This will completely remove the task with ID 1. You'll be asked to confirm before the task is removed. This action cannot be undone.

### Frequency Methods

[](#frequency-methods)

You can use any of Laravel's schedule frequency methods:

- `hourly()`
- `daily()`
- `weekly()`
- `monthly()`
- `quarterly()`
- `yearly()`
- `timezone()`
- `at()`
- `dailyAt()`
- `twiceDaily()`
- `weeklyOn()`
- `monthly()`
- `monthlyOn()`
- `lastDayOfMonth()`
- `quarterly()`
- `yearly()`
- `cron()`
- `everyMinute()`
- `everyTwoMinutes()`
- `everyThreeMinutes()`
- `everyFourMinutes()`
- `everyFiveMinutes()`
- `everyTenMinutes()`
- `everyFifteenMinutes()`
- `everyThirtyMinutes()`

### Available Constraints

[](#available-constraints)

You can add any of Laravel's schedule constraints:

- `environments(['production'])`
- `evenInMaintenanceMode()`
- `withoutOverlapping()`
- `onOneServer()`
- `between('8:00', '17:00')`
- `unlessBetween('23:00', '4:00')`
- `when(closure)`
- `skip(closure)`
- `runInBackground()`

### Example Tasks

[](#example-tasks)

#### Basic Daily Task

[](#basic-daily-task)

```
php artisan schedule:add "cache:clear" --frequency=daily
```

#### Weekly Backup with Parameters

[](#weekly-backup-with-parameters)

```
php artisan schedule:add "backup:run" \
    --frequency=weekly \
    --freq-parameters='["monday", "3:00"]' \
    --parameters='["--only-db"]' \
    --constraints='[{"method":"environments", "parameters":["production"]}]'
```

#### Hourly Task with Multiple Constraints

[](#hourly-task-with-multiple-constraints)

```
php artisan schedule:add "queue:work" \
    --frequency=hourly \
    --constraints='[
        {"method":"withoutOverlapping"},
        {"method":"environments", "parameters":["production"]},
        {"method":"evenInMaintenanceMode"},
        {"method":"runInBackground"}
    ]'
```

Testing the Package
-------------------

[](#testing-the-package)

Run the test suite:

```
composer test
```

Uninstallation
--------------

[](#uninstallation)

To completely remove the package from your Laravel project:

1. Remove your schedule configuration from your Laravel project:

- For Laravel 11: Remove the `ScheduleManager::schedule();` line from `routes/console.php`
- For Laravel 10: Remove the `ScheduleManager::schedule();` line from `app/Console/Kernel.php`

2. Remove the published configuration file:

```
rm config/schedule-mgt.php
```

3. Remove the stored task data (optional):

```
rm -rf storage/app/schedule-mgt
```

4. Uninstall the package via composer:

```
composer remove trogers1884/laravel-schedule-mgt
```

Security
--------

[](#security)

If you discover any security related issues, please use the issue tracker located at  .

Credits
-------

[](#credits)

- [Tom Rogers](https://github.com/trogers1884)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

521d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33fdd133f51e6eff6096d0dd0b15dd11184caa054ed0d7e1c70a1e8d5080a5c7?d=identicon)[trogers1884](/maintainers/trogers1884)

---

Top Contributors

[![trogers1884](https://avatars.githubusercontent.com/u/641590?v=4)](https://github.com/trogers1884 "trogers1884 (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/trogers1884-laravel-schedule-mgt/health.svg)

```
[![Health](https://phpackages.com/badges/trogers1884-laravel-schedule-mgt/health.svg)](https://phpackages.com/packages/trogers1884-laravel-schedule-mgt)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
