PHPackages                             artemyurov/moonshine-command-schedule-job - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. artemyurov/moonshine-command-schedule-job

ActiveLibrary[Queues &amp; Workers](/categories/queues)

artemyurov/moonshine-command-schedule-job
=========================================

Single entry point for Laravel scheduled commands and queued jobs with MoonShine admin UI

v1.0.1(1mo ago)011↑2627.3%MITPHPPHP ^8.2

Since Mar 23Pushed 1mo agoCompare

[ Source](https://github.com/ArtemYurov/moonshine-command-schedule-job)[ Packagist](https://packagist.org/packages/artemyurov/moonshine-command-schedule-job)[ RSS](/packages/artemyurov-moonshine-command-schedule-job/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

MoonShine Command Schedule Job
==============================

[](#moonshine-command-schedule-job)

[![PHP](https://camo.githubusercontent.com/5fe05c705bf034839bda7651781e4d0a9d42f4a840478ca5e343873a0361bb89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c75652e737667)](https://www.php.net)[![Laravel](https://camo.githubusercontent.com/2144072817ae69f5a02db93633bcc86db7f0d6f5c2731086d75121f1636194cd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d313125374331322d7265642e737667)](https://laravel.com)[![MoonShine](https://camo.githubusercontent.com/693680915a4bf4311b0d560dff3d86af1ad1318dcc424be3ac415d33ae04efff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f6f6e5368696e652d342e782d707572706c652e737667)](https://moonshine-laravel.com)[![License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

**One class = artisan command + scheduler + queue job + admin UI.**

Define a single service class — the package auto-registers an artisan command and scheduler entry, with a MoonShine admin panel for managing schedules at runtime.

---

Quick Start
-----------

[](#quick-start)

```
class SyncAccountData extends CommandScheduleJobService
{
    protected string $commandSignature = 'sync:account-data {--account-id=}';
    protected string $commandDescription = 'Sync account data from external API';
    protected ?string $scheduleFrequency = 'everyFiveMinutes';
    protected ?string $jobClass = SyncAccountDataJob::class;

    protected function handle(array $params = []): void
    {
        $account = Account::findOrFail($params['account-id']);
        $this->dispatchJob($account);
    }
}
```

```
php artisan sync:account-data --account-id=42
```

---

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

[](#installation)

```
composer require artemyurov/moonshine-command-schedule-job
php artisan migrate
```

Publish config (optional):

```
php artisan vendor:publish --tag=command-schedule-job-config
```

---

Features
--------

[](#features)

- **Console + Scheduler** — every service automatically becomes an artisan command and a scheduler entry
- **Queue Jobs** — set `$jobClass` to dispatch queued jobs with built-in deduplication
- **MoonShine Admin UI** — toggle scheduler, configure frequency, view run times, copy commands
- **Artisan Generator** — `php artisan make:command-schedule-job-service MyService`
- **Auto-discovery** — scans configured directories for service classes

---

Service Discovery
-----------------

[](#service-discovery)

The package auto-discovers services by scanning configured directories:

```
// config/command-schedule-job.php
'discovery' => [
    'paths' => ['app/Services/'],
    'namespaces' => ['App\\Services'],
],
```

Any non-abstract class extending `CommandScheduleJobService` found in these paths will be auto-registered.

---

Service Properties
------------------

[](#service-properties)

PropertyTypeDefaultDescription`$commandSignature``string`*required*Artisan command signature`$commandDescription``string`*required*Command description`$scheduleFrequency``?string``null`Schedule method (`daily`, `hourly`, `everyFiveMinutes`, etc.)`$scheduleFrequencyArgs``?array``null`Arguments for the frequency method`$scheduleConsoleArgs``?string``null`Extra console arguments for the scheduled command`$jobClass``?string``null`Job class to dispatch (null = sync execution)`$withoutOverlappingJob``bool``true`Check for active jobs before dispatch`$withoutOverlappingJobExpiresAt``?int``null`Lookup window in minutes (null = config default)---

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

[](#configuration)

```
// config/command-schedule-job.php
return [
    'discovery' => [
        'paths' => ['app/Services/'],
        'namespaces' => ['App\\Services'],
    ],
    'table' => 'command_schedule_jobs',
    'default_without_overlapping_job_expires_at' => 180,
];
```

---

Optional Dependencies
---------------------

[](#optional-dependencies)

PackageWhat it enables`laravel/horizon`Queue-based job search and management`artemyurov/moonshine-db-joblog`PID-based precise job termination`ext-posix`PID-based process terminationCore functionality works without these. Job deduplication and termination are enhanced when installed.

---

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

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12
- MoonShine 4.x

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~0 days

Total

2

Last Release

50d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffb938044c91bebfb7bc0aca76e9dae0c7b975080de1b253210617d1c61744c4?d=identicon)[ArtemYurov](/maintainers/ArtemYurov)

---

Top Contributors

[![ArtemYurov](https://avatars.githubusercontent.com/u/13986502?v=4)](https://github.com/ArtemYurov "ArtemYurov (3 commits)")

---

Tags

laravel-packagelaravel-packagesmoonshinemoonshine-laravelmoonshine-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/artemyurov-moonshine-command-schedule-job/health.svg)

```
[![Health](https://phpackages.com/badges/artemyurov-moonshine-command-schedule-job/health.svg)](https://phpackages.com/packages/artemyurov-moonshine-command-schedule-job)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[prwnr/laravel-streamer

Events streaming package for Laravel that uses Redis 5 streams

110196.9k1](/packages/prwnr-laravel-streamer)

PHPackages © 2026

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