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

ActiveLibrary

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

A simple event scheduler application for PHP projects

1.0.0(10y ago)2241MITPHPPHP &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 2mo ago

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 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

3665d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0669fdbc2c3ae9e7da98a682dfc3f70d85973d9ab08ef0d325f66f6f3bcda63a?d=identicon)[daltonmenezes](/maintainers/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

[jmose/command-scheduler-bundle

This Symfony bundle will allow you to schedule all your commands just like UNIX crontab

3361.4M1](/packages/jmose-command-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)[kiwicommerce/module-cron-scheduler

Easily set up and manage cron jobs from the backend with a beautiful and managed timeline feature. Find the actual load on CPU/Memory by cron job execution.

74603.3k](/packages/kiwicommerce-module-cron-scheduler)[guikingone/scheduler-bundle

A Symfony bundle that allows to schedule and create repetitive tasks

114217.4k](/packages/guikingone-scheduler-bundle)[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)

PHPackages © 2026

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