PHPackages                             krydos/php-notifier - 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. krydos/php-notifier

ActiveLibrary

krydos/php-notifier
===================

PHP task scheduler

0.2.0(10y ago)161143[1 issues](https://github.com/KryDos/PHPNotifier/issues)MITPHP

Since Mar 26Pushed 10y ago4 watchersCompare

[ Source](https://github.com/KryDos/PHPNotifier)[ Packagist](https://packagist.org/packages/krydos/php-notifier)[ RSS](/packages/krydos-php-notifier/feed)WikiDiscussions master Synced 2mo ago

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

[![Build Status](https://camo.githubusercontent.com/7e07ac67d7b80ddbff15ccaa73249d04cfdb83cbf07be6ea1ed2ce80696a81db/68747470733a2f2f7472617669732d63692e6f72672f4b7279446f732f5048504e6f7469666965722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/KryDos/PHPNotifier)

PHPNotifier
===========

[](#phpnotifier)

**PHPNotifier** - is a task scheduler. Allows you to schedule a task that will be executed at any time you wish.

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

[](#installation)

add to your composer.json - `"krydos/php-notifier": "*"`

Usage
-----

[](#usage)

First of all you have to run a script that will be listening for new tasks and execute them when time came.

`php ./vendor/bin/phpnotifier /absolute/path/to/db.file`

or if you want to leave it working in background

`nohup php ./vendor/bin/phpnotifier /absolute/path/to/db.file & >/dev/null 2>&1 &`

Using `nohup` you can see log output in `nohup.out` file.

How to create new tasks:

```
use \PHPNotifier\PHPNotifier;

$scheduler = new PHPNotifier(PHPNotifier::FILE_METHOD, '/absolute/path/to/db.file');
$scheduler->scheduleTaskIn(10, 'echo', [
    'Hello world!'
    '>'
    'any_file'
]);
```

This task will be executed in 10 seconds. Command that will be executed is `echo Hello world! > any_file`

Since sometimes you know exact time when you want to run a task and you don't want to calculate how many time is remaining there is another method exists - `scheduleTaskAtTime` with same signature.

```
use \PHPNotifier\PHPNotifier;

$scheduler = new PHPNotifier(PHPNotifier::FILE_METHOD, '/absolute/path/to/db.file');
$scheduler->scheduleTaskAtTime(1459382400, 'echo', [
    'Hello world!'
    '>'
    'any_file'
]);
```

This method accepts unix timestamp or \\DateTime object as first argument. If you use `DateTime` PHP's object you can get this value by `getTimestamp()` method.

**make sure that binary you're trying to execute is exists in your system**

TODO
----

[](#todo)

- support Redis as task store method
- support as many store methods as possible
- ability to accept DateTime as first argument for `scheduleTaskAtTime` method
- ability to accept any valid date string as first argument of `scheduleTaskAtTime` method
- ability to schedule repeatable tasks

Contributing
------------

[](#contributing)

There are no special rules. Just send a pull request or create an issue.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

3700d ago

### Community

Maintainers

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

---

Top Contributors

[![krydos](https://avatars.githubusercontent.com/u/910691?v=4)](https://github.com/krydos "krydos (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/krydos-php-notifier/health.svg)

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

PHPackages © 2026

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