2017 © Pedro Peláez
 

library crond

Distributed Cron Worker

image

teknasyon/crond

Distributed Cron Worker

  • Wednesday, December 6, 2017
  • by teknasyon
  • Repository
  • 1 Watchers
  • 0 Stars
  • 111 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

crond

Distributed Cron Daemon with PHP, (*1)

Requirements

  • PHP 8.0+
  • aws/aws-sdk-php
  • dragonmantank/cron-expression
  • psr/log

Usage

  • Set your cron config, ``` php $crons = [ 'my_cron_id1' => [ 'expression' => '* * * * ', 'cmd' => '/usr/bin/php /pathto/myproject/mycron.php', 'lock' => 0 //No need lock ], 'my_cron_id2' => [ 'expression' => '/10 * * * ', 'cmd' => '/usr/bin/php /pathto/myproject/minutecron.php', 'lock' => 1 ], 'my_cron_id2' => [ 'expression' => ' * * * *', 'cmd' => '/usr/bin/php /pathto/myproject/infinitecron.php' // Like lock:1 ] ]
- Create your Locker class \Teknasyon\Crond\Locker\MemcachedLocker or \Teknasyon\Crond\Locker\RedisLocker
- Create \Teknasyon\Crond\Daemon with cron config and Locker class

``` php
<?php

use Teknasyon\Crond\Locker\RedisLocker;
use Teknasyon\Crond\Daemon;

try {
$crond = new Daemon($cronConfig, $locker);
$crond->setLogger($myPsrLoggerInterfacedObj);
$crond->start();

} catch (\Exception $e) {
    //Error handling
}

// ...

The Versions

06/12 2017
06/12 2017

dev-master

9999999-dev https://github.com/teknasyon-teknoloji/crond

Distributed Cron Worker

  Sources   Download

MIT

The Requires

 

The Development Requires

php cronjob redis worker cron lock crond teknasyon

29/11 2017
24/11 2017
20/11 2017