PHPackages                             pmill/php-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pmill/php-scheduler

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

pmill/php-scheduler
===================

Simple PHP task scheduler

v0.1.5(11y ago)1833.5k↓38.9%7MITPHPPHP &gt;=5.4.0CI failing

Since Feb 6Pushed 6y ago3 watchersCompare

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

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

php-scheduler
=============

[](#php-scheduler)

[![Code Climate](https://camo.githubusercontent.com/5c54c826fee3913ee7e03033403ef67b84a2941581411160f2a707e421e46a9f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f706d696c6c2f7068702d7363686564756c65722f6261646765732f6770612e737667)](https://codeclimate.com/github/pmill/php-scheduler) [![Test Coverage](https://camo.githubusercontent.com/128c84540a3260886781b8a451c267f881da5e88232793ccbc819678035036d0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706d696c6c2f7068702d7363686564756c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/pmill/php-scheduler/) [![Downloads](https://camo.githubusercontent.com/b6c4979870021dafe1889add9dd698f793fa5dc67e0cfe9a4850d647e1316e3c/68747470733a2f2f706f7365722e707567782e6f72672f706d696c6c2f7068702d7363686564756c65722f646f776e6c6f616473)](https://camo.githubusercontent.com/b6c4979870021dafe1889add9dd698f793fa5dc67e0cfe9a4850d647e1316e3c/68747470733a2f2f706f7365722e707567782e6f72672f706d696c6c2f7068702d7363686564756c65722f646f776e6c6f616473)

Introduction
------------

[](#introduction)

This package contains a simple PHP cron task scheduler that helps you version control your cron jobs.

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

[](#requirements)

This library package requires PHP 5.4 or later and a linux operating system.

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

[](#installation)

### Installing via Composer

[](#installing-via-composer)

The recommended way to install php-scheduler is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest version of php-scheduler:

```
composer.phar require pmill/php-scheduler
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

Once you've created your task list script (see Usage below) open a linux shell add the following line to crontab (crontab -e):

```
* * * * * php /path/to/your/task/list/script.php

```

Usage
-----

[](#usage)

The following example shows how to schedule a HelloDaily task (simple echo example) and a ShellMonday task (running a shell task example).

```
class HelloDailyTask extends \pmill\Scheduler\Task\Task
{
    public function run()
    {
        $this->setOutput('Hello World');
    }
}

class ShellMondayTask extends \pmill\Scheduler\Task\Shell
{
    protected $command = "echo Hello Monday";
}

$taskList = new \pmill\Scheduler\TaskList;

// Add task to run at 15:04 every day
$taskList->addTask((new HelloDailyTask)->setExpression('4 15 * * *'));

// Add task to run at 15:04 every Monday
$taskList->addTask((new ShellMondayTask)->setExpression('4 15 * * 1'));

$taskList->run();
$output = $taskList->getOutput();

```

Version History
---------------

[](#version-history)

0.1.5 (13/03/2019)

- Resolve list of tasks due before running the tasks (thanks [jhoughtelin](https://github.com/jhoughtelin))

0.1.4 (25/01/2018)

- Removed nesbot/carbon dependency

0.1.3 (24/05/2015)

- Added unit tests

0.1.2 (13/05/2015)

- Fixed missing output bug

0.1.1 (06/02/2015)

- Fixed incorrect paths

0.1.0 (06/02/2015)

- First public release of php-scheduler

Copyright
---------

[](#copyright)

php-scheduler Copyright (c) 2015 pmill () All rights reserved.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92% 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

6

Last Release

4120d ago

### Community

Maintainers

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

---

Top Contributors

[![pmill](https://avatars.githubusercontent.com/u/3912365?v=4)](https://github.com/pmill "pmill (23 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (1 commits)")[![jhoughtelin](https://avatars.githubusercontent.com/u/6137941?v=4)](https://github.com/jhoughtelin "jhoughtelin (1 commits)")

---

Tags

phpschedulercrontask

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)[ttree/scheduler

Simple task scheduler for Neos Flow Framework

21108.8k1](/packages/ttree-scheduler)[webtoolsnz/yii2-scheduler

A scheduled task runner for Yii2 applications

1881.1k](/packages/webtoolsnz-yii2-scheduler)[glooby/task-bundle

Scheduling of tasks for symfony made simple

3216.3k](/packages/glooby-task-bundle)

PHPackages © 2026

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