PHPackages                             joesweeny/schedule - 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. joesweeny/schedule

ActiveLibrary

joesweeny/schedule
==================

0.1.1(8y ago)014PHP

Since Mar 1Pushed 8y ago1 watchersCompare

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

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

Schedule
========

[](#schedule)

An extremely lightweight library to create and filter console based commands that can be run on a schedule

Usage
=====

[](#usage)

Individual tasks can be instantiated with or without arguments

```
use JoeSweeny\Schedule\Task;

$task1 = new Task('delete:files');

$task2 = new Task('notify:users', ['--admin']);
```

When instantiated a Task's frequency can be added to let the Schedule know when the Task is required to run

```
use JoeSweeny\Schedule\Task;

$task1 = new Task('delete:files');

// Task will run every Monday at 00:00
$task1->weekly();

// Additional frequency methods can be chained to the Task to be more specific

$task2 = new Task('notify:users', ['--admin']);

// Task will run every Wednesday at 09:00AM
$task2->wednesdays()->at('09:00');

// Note any Task without a frequency specified will automatically run every minute of every day
```

Individual Tasks can be added to a Schedule

```
use JoeSweeny\Schedule\Task;
use JoeSweeny\Schedule\Schedule;

$task1 = (new Task('delete:files'))->sundays();

$task2 = new Task('notify:users', ['--admin']);

$schedule = new Schedule;

$schedule->addTask($task1)->addTask($task2);

$schedule->getTasks()
// Will return [(new Task('delete:files'))->sundays(), new Task('notify:users', ['--admin'])]
```

Once a Schedule has Tasks, the Tasks can be filtered on Tasks that are currently due to run

```
use JoeSweeny\Schedule\Task;
use JoeSweeny\Schedule\Schedule;

$task1 = (new Task('delete:files'))->sundays();

$task2 = new Task('notify:users', ['--admin']);

$schedule = new Schedule;

$schedule->addTask($task1)->addTask($task2);

$schedule->getDueTasks();
// Will return an array of Task objects ready to be executed
```

Once due Tasks are filtered they can be individually executed by the consuming application. The example uses Symfony Console as an example although other libraries can be used

```
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\BufferedOutput;
use JoeSweeny\Schedule\Task;
use JoeSweeny\Schedule\Schedule;

$schedule = new Schedule;

$application = new Application('CLI Application');

$schedule
    ->addTask((new Task('delete:files'))->sundays())
    ->addTask(new Task('notify:users', ['--admin']));

$due = $schedule->getDueTasks();

foreach($due as $task) {
    $application->run(new StringInput($task->execute()), $output = new BufferedOutput);
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

2990d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/104a4053ccd7d06c2cf5384f302ff4952a353e528700c6280954e41d1cbff4b7?d=identicon)[joesweeny](/maintainers/joesweeny)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joesweeny-schedule/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M368](/packages/laravel-zero-framework)

PHPackages © 2026

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