PHPackages                             mvaliolahi/scheduler - 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. mvaliolahi/scheduler

ActiveLibrary

mvaliolahi/scheduler
====================

Command Scheduler.

v0.0.6(8y ago)258[1 PRs](https://github.com/mvaliolahi/scheduler/pulls)PHP

Since Dec 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mvaliolahi/scheduler)[ Packagist](https://packagist.org/packages/mvaliolahi/scheduler)[ Docs](https://mvaliolahi.ir)[ RSS](/packages/mvaliolahi-scheduler/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (4)Versions (8)Used By (0)

Command Scheduler
-----------------

[](#command-scheduler)

[![Latest Stable Version](https://camo.githubusercontent.com/ebdd0fdc6c7fd04e47a5d861e6c155fe8b96f447af898c762aefcd209aadf43c/68747470733a2f2f706f7365722e707567782e6f72672f6d76616c696f6c6168692f7363686564756c65722f762f737461626c65)](https://packagist.org/packages/mvaliolahi/scheduler)[![Total Downloads](https://camo.githubusercontent.com/f3d872e860b415cb25731050bfb9d398963dc532ebd3f6d020bc1bb60251bc4e/68747470733a2f2f706f7365722e707567782e6f72672f6d76616c696f6c6168692f7363686564756c65722f646f776e6c6f616473)](https://packagist.org/packages/mvaliolahi/scheduler)[![Build Status](https://camo.githubusercontent.com/c143a975be95f39bfe8c4ec229af42e59342a19c45ca65facbbe998224c3ec2c/68747470733a2f2f7472617669732d63692e6f72672f6d76616c696f6c6168692f7363686564756c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mvaliolahi/scheduler)[![StyleCI](https://camo.githubusercontent.com/93f5e66fb09c37945604e5399aa4875bd755033365c67eaf45c0759b43963543/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3131333734393337332f736869656c643f7374796c653d666c6174)](https://github.styleci.io/repos/113749373)[![PHP-Eye](https://camo.githubusercontent.com/faada83217fe64fcef045a4985f1cf6a5b986d6ec3f77e4e1df7189b762f7b25/68747470733a2f2f7068702d6579652e636f6d2f62616467652f6d76616c696f6c6168692f7363686564756c65722f7465737465642e7376673f7374796c653d666c6174)](https://php-eye.com/package/mvaliolahi/scheduler)

framework agnostic command scheduler that can be easily integrated with any project.

```
    $ composer require mvaliolahi/scheduler`
```

##### Usage

[](#usage)

1. create an instance of Scheduler then add some command and schedule them.

```

    $scheduler = new Scheduler([
        'cwd' => 'project path | where commands can be run',
        'command_prefix' => 'php specific-cli',
        'cache' => 'an implementation from OverlappinCache Contract'
    ]);

    $scheduler->command('rm test.php -fr')
    ->hourly()
    ->when(function()
    {
        return true; // in this situation.
    });

        $scheduler->start();
```

\*tip: cache should not be instance.

2. use a cron job to run the $scheduler-&gt;start() in a specific period of time.: `* * * * * php /project/schedule:run >> /dev/null 2>&1`

Tips: Scheduler can be configured using another params named `timezone`, this parameter apply an specific timezone to add commands but you can overwrite them using `->timezone()` method.

###### Frequencies:

[](#frequencies)

```
   ->everyMinute();	Run the command every minute
   ->everyFiveMinutes();	Run the command every five minutes
   ->everyTenMinutes();	Run the command every ten minutes
   ->everyFifteenMinutes();	Run the command every fifteen minutes
   ->everyThirtyMinutes();	Run the command every thirty minutes
   ->hourly();	Run the command every hour
   ->hourlyAt(17);	Run the command every hour at 17 mins past the hour
   ->daily();	Run the command every day at midnight
   ->dailyAt('13:00');	Run the command every day at 13:00
   ->twiceDaily(1, 13);	Run the command daily at 1:00 & 13:00
   ->weekly();	Run the command every week
   ->monthly();	Run the command every month
   ->monthlyOn(4, '15:00');	Run the command every month on the 4th at 15:00
   ->quarterly();	Run the command every quarter
   ->yearly();	Run the command every year
   ->timezone('America/New_York');	Set the timezone
   ->weekdays();	Limit the command to weekdays
   ->sundays();	Limit the command to Sunday
   ->mondays();	Limit the command to Monday
   ->tuesdays();	Limit the command to Tuesday
   ->wednesdays();	Limit the command to Wednesday
   ->thursdays();	Limit the command to Thursday
   ->fridays();	Limit the command to Friday
   ->saturdays();	Limit the command to Saturday
   ->between($start, $end);	Limit the command to run between start and end times
   ->when(Closure);	Limit the command based on a truth test
```

##### Todo

[](#todo)

```
- add specific class with specific method for trigger instead usual command to scheduler.

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

6

Last Release

3010d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d8a3eaee2623560bfdc9906358e1805abd4adf9fcd9170eba274fcfd8a51443?d=identicon)[mvaliolahi](/maintainers/mvaliolahi)

---

Top Contributors

[![mvaliolahi](https://avatars.githubusercontent.com/u/6920600?v=4)](https://github.com/mvaliolahi "mvaliolahi (13 commits)")

---

Tags

schedulercronscheduleJob ScheduleCommand Scheduler

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mvaliolahi-scheduler/health.svg)

```
[![Health](https://phpackages.com/badges/mvaliolahi-scheduler/health.svg)](https://phpackages.com/packages/mvaliolahi-scheduler)
```

###  Alternatives

[guikingone/scheduler-bundle

A Symfony bundle that allows to schedule and create repetitive tasks

114217.4k](/packages/guikingone-scheduler-bundle)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[symfony/scheduler

Provides scheduling through Symfony Messenger

8810.8M52](/packages/symfony-scheduler)[orisai/scheduler

Cron job scheduler - with locks, parallelism and more

4037.1k4](/packages/orisai-scheduler)[shapecode/cron-bundle

This bundle provides scheduled execution of Symfony commands

59493.0k2](/packages/shapecode-cron-bundle)[aboutcoders/job-bundle

A symfony bundle for asynchronous job processing.

2618.0k1](/packages/aboutcoders-job-bundle)

PHPackages © 2026

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