PHPackages                             daltonmenezes/eventscheduler - 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. daltonmenezes/eventscheduler

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

daltonmenezes/eventscheduler
============================

A simple event scheduler application for PHP projects

1.0.0(10y ago)3241MITPHPPHP &gt;=5.2.8

Since Apr 29Pushed 7y ago2 watchersCompare

[ Source](https://github.com/daltonmenezes/eventScheduler)[ Packagist](https://packagist.org/packages/daltonmenezes/eventscheduler)[ Docs](https://github.com/daltonmenezes/eventScheduler)[ RSS](/packages/daltonmenezes-eventscheduler/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

eventScheduler
==============

[](#eventscheduler)

[![become a patron or sponsor](https://camo.githubusercontent.com/25040c771195c6aa7fd6796382ef614858481044b38f6fd934896e6a888bb833/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6265636f6d65253230612d706174726f6e2532306f7225323073706f6e736f722d6f72616e67652e737667)](https://www.patreon.com/daltonmenezes)[![Build Status](https://camo.githubusercontent.com/aff35f0ad9bdeeeecd29f5b6fd7192794de19ad36a5d7dfea67499ffeec5c6b5/68747470733a2f2f7472617669732d63692e6f72672f64616c746f6e6d656e657a65732f6576656e745363686564756c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/daltonmenezes/eventScheduler) [![Code Climate](https://camo.githubusercontent.com/7c6c0936ee1cac147bd2a85382bb069216b1a5bc5e273fa7750838a0fb057ef7/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f64616c746f6e6d656e657a65732f6576656e745363686564756c65722f6261646765732f6770612e737667)](https://codeclimate.com/github/daltonmenezes/eventScheduler)

A simple event scheduler application for PHP projects.

Installation
============

[](#installation)

The Package is available on [Packagist](https://packagist.org/packages/daltonmenezes/eventscheduler), you can install it using [Composer](http://getcomposer.org).

```
composer require daltonmenezes/eventscheduler
```

### Dependencies

[](#dependencies)

- [PHP](https://php.net) 5.3+

How it works?
-------------

[](#how-it-works)

Setting a start and finish date, you can trigger different events for each.

The behavior you set to be triggered on the start date is defined by after() event;

The behavior you set to be triggered while the start date is not reached is the before() event;

When the finish date is reached, after() event is suspended, as well before() event too.

The finish date is optional, if you want the after() event continues in your project execution without date limitations, simply do not set the key "finish" in your array.

Usage
-----

[](#usage)

Instantiate EventScheduler\\EventScheduler.

```
use EventScheduler\EventScheduler;

$event = new EventScheduler();
```

Define a start date in your schedule, its must be an array.

```
$schedule = array("start" => "18-03-2016 23:43");
```

The start key is for when your event must be triggered. If you want define a finish date for shutdown it, you must define a finish key in your array.

```
$schedule = array(
	"start" => "18-03-2016 23:43",
	"finish" => "20-03-2020 19:13"
);
```

Now, call the schedule method for set your array.

```
$event->schedule($schedule);
```

Call the before() method for set this behavior. The parameter must be a Closure. If you do not want call and define this method, it's ok. It's optional.

```
$event->before(function() {
	// define here whatever you want execute as an expected behavior
});
```

Call the after() method for set this behavior. The parameter must be a Closure. If you do not want call and define this method, it's ok. It's optional.

```
$event->after(function() {
	// define here whatever you want execute as an expected behavior
});
```

Call the run() method for when all is done!

```
$event->run();
```

Nothing more! It's simple! ;) You can read or test the [example.php](https://github.com/daltonmenezes/eventScheduler/blob/master/example.php) file at the root directory of this project.

Problems or suggestions?
------------------------

[](#problems-or-suggestions)

Open a [Issue](https://github.com/daltonmenezes/eventScheduler/issues). :)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

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

Unknown

Total

1

Last Release

3714d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1149845?v=4)[Dalton Menezes](/maintainers/daltonmenezes)[@daltonmenezes](https://github.com/daltonmenezes)

---

Top Contributors

[![daltonmenezes](https://avatars.githubusercontent.com/u/1149845?v=4)](https://github.com/daltonmenezes "daltonmenezes (31 commits)")

---

Tags

behavioreventphpscheduletriggerschedulereventscron

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/daltonmenezes-eventscheduler/health.svg)

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

###  Alternatives

[symfony/scheduler

Provides scheduling through Symfony Messenger

9012.8M97](/packages/symfony-scheduler)[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

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

Simple task scheduler for Neos Flow Framework

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

A scheduled task runner for Yii2 applications

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

Scheduling of tasks for symfony made simple

3216.4k](/packages/glooby-task-bundle)[pmill/php-scheduler

Simple PHP task scheduler

1734.1k](/packages/pmill-php-scheduler)

PHPackages © 2026

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