Skip to content

Releases: WyriHaximus/reactphp-cron

5.0.0

13 Apr 11:16
896444f
Compare
Choose a tag to compare

Error handling

With promise v3 uncaught rejected promises will no longer bubble up. As a result the running con instance will now emit
errors when they occur and those must be handled.

$cron = Cron::create(...$actions);
$cron->on('error', static function (Throwable $throwable): void {
    // Handle error
});

5.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 10
  • Total contributors: 3

Dependencies 📦

Dependencies 📦,Enhancement ✨

Enhancement ✨

4.0.0

29 Jan 21:20
80c24d6
Compare
Choose a tag to compare

v4 makes the major shift of running all actions in a fiber, as such you can use await() in them by default without having to wrap them yourself inside an async(). This is code wise a tiny change but with a huge impact. The ActionInterface needed to be changed so it became a new major release, and running each action in a fiber has a neglectable performance impact.

4.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 4
  • Total contributors: 2

CI 🚧,Configuration ⚙,Dependencies 📦,Documentation 📚,JSON 👨‍💼,MarkDown 📝,PHP 🐘,YAML 🍄

CI 🚧,Configuration ⚙,Dependencies 📦,Feature 🏗,JSON 👨‍💼,PHP 🐘,Source 🔮,Tests 🧪,YAML 🍄

Dependencies 📦,PHP 🐘

3.1.0

15 Aug 10:50
4a53d61
Compare
Choose a tag to compare

3.1.0

  • Total issues resolved: 0
  • Total pull requests resolved: 3
  • Total contributors: 2

Dependencies 📦,JSON 👨‍💼,PHP 🐘

Configuration ⚙,YAML 🍄

Dependencies 📦,PHP 🐘

3.0.0

10 Aug 09:35
684323a
Compare
Choose a tag to compare

Switch to global event loop accessor

<?php

use React�ventLoop\Factory;
use React\Promise\PromiseInterface;
use function React\Promise
esolve;
use WyriHaximus\React\Action;
use WyriHaximus\React\Cron;

require 'vendor/autoload.php';

$loop = Factory::create();

Cron::createHighPrecision(
    $loop,
    new Action(
        'Hour', // Identifier used for mutex locking locking
        '@hourly', // The cron expression used to schedule this action
        function (): PromiseInterface { // The callable ran when this action is due according to it's schedule
            echo 'Another hour has passed!', PHP_EOL;

            return resolve(true); // This callable MUST return a promise, which is used for releasing the mutex lock
        }
    ),
    new Action(
        'Minute',
        '* * * * *',
        function (): PromiseInterface {
            echo 'Another minute has passed!', PHP_EOL;

            return resolve(true);
        }
    )
);

$loop->run();

To:

<?php

use React�ventLoop\Factory;
use React�ventLoop\Loop;
use React\Promise\PromiseInterface;
use function React\Promise
esolve;
use WyriHaximus\React\Cron;

require 'vendor/autoload.php';

Cron::create(
    new Cron\Action(
        'Hour', // Identifier used for mutex locking locking
        1, // TTL for Mutex Locking (usually a few times the maximum time this cron should take)
        '@hourly', // The cron expression used to schedule this action
        function (): PromiseInterface { // The callable ran when this action is due according to it's schedule
            echo 'Another hour has passed!', PHP_EOL;

            return resolve(true); // This callable MUST return a promise, which is used for releasing the mutex lock
        }
    ),
    new Cron\Action(
        'Minute',
        300,
        '* * * * *',
        function (): PromiseInterface {
            echo 'Another minute has passed!', PHP_EOL;

            return resolve(true);
        }
    )
);

PHP 8

The release adds PHP 8 support!

PHP 8 Logo

3.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 7
  • Total contributors: 2

Documentation 📚,MarkDown 📝

PHP 🐘,Source 🔮

PHP 🐘

Dependencies 📦,JSON 👨‍💼,PHP 🐘

Dependencies 📦,JSON 👨‍💼,PHP 🐘,Source 🔮,Tests 🧪,enhancement

2.1.2

04 Apr 21:20
1810f22
Compare
Choose a tag to compare

2.1.2

  • Total issues resolved: 0
  • Total pull requests resolved: 2
  • Total contributors: 1

PHP 🐘,Source 🔮,bug

2.1.1

03 Apr 21:34
6e8259e
Compare
Choose a tag to compare

2.1.1

  • Total issues resolved: 0
  • Total pull requests resolved: 16
  • Total contributors: 2

Dependencies 📦,JSON 👨‍💼,PHP 🐘,Source 🔮

Dependencies 📦,JSON 👨‍💼,PHP 🐘

2.1.0

11 Feb 08:19
0233ba8
Compare
Choose a tag to compare

2.0.0

22 Jan 20:52
0512ebe
Compare
Choose a tag to compare

Most notable changes:

  • Moved everything but the Cron class to the Cron namespace
  • Raised minimum PHP version to 7.4
  • All actions now required a TTL to lock the cronjob for
  • The high precision scheduler is now the default and only scheduler
  • Raised mutex to v2

2.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 13
  • Total contributors: 2

Documentation 📚,MarkDown 📝

CI 🚧,Configuration ⚙,YAML 🍄

Dependencies 📦,JSON 👨‍💼,PHP 🐘,Source 🔮

PHP 🐘,Source 🔮,Tests 🧪

Dependencies 📦,JSON 👨‍💼,PHP 🐘

PHP 🐘,Source 🔮

Dependencies 📦,JSON 👨‍💼,PHP 🐘,Source 🔮,Tests 🧪

Documentation 📚,MarkDown 📝,PHP 🐘,Source 🔮,Tests 🧪

enhancement

PHP 🐘,Source 🔮,Tests 🧪,enhancement

1.0.0

25 Feb 21:13
1.0.0
Compare
Choose a tag to compare
  • Initial release