2017 © Pedro Peláez
 

library php-job-runner

image

johnroyer/php-job-runner

  • Thursday, May 25, 2017
  • by johnroyer
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

php-job-runner Build Status

A simple tool to help you execute routine jobs., (*1)

Example

Create a job extends from AbstractJob:, (*2)

class Cleanner extends \JobRunner\AbstractJob
{
    private $jobId = 'clean-outdated-backup';
    private $runTime = '0 3 * * *';

    public function update(\SplSubject $runner)
    {
        // clean outdated backups
    }
}

Register your job to runner:, (*3)

$runner = new JobRunner\Runner();

$runner->attach(new Cleanner);
$runner->attach(new SomeOtherJob);
// ...

$runner->notify();  // runner will notify job which should run at current time

trigger runner by Linux crontab:, (*4)

$ crontab -e
*/1 * * * *        /usr/bin/php  /path/to/bin/runner.php 2>&1 >/dev/null   // check jobs every minutes

TODO

there is something to improvent:, (*5)

  • job logger / notifier
  • support jobs run only once in a week
  • job which will block / conflict other jobs
  • better time / routine descreption

License

  • MIT license

The Versions

25/05 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by zero

25/05 2017

v1.1.2

1.1.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by zero

25/05 2017

v1.1.1

1.1.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by zero

25/05 2017

v1.1.0

1.1.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by zero

25/05 2017

dev-cronExp

dev-cronExp

  Sources   Download

MIT

The Requires

 

The Development Requires

by zero

17/05 2017

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by zero

13/05 2017

v1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by zero

13/05 2017

v0.9.1

0.9.1.0

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by zero

12/05 2017

v0.9.0

0.9.0.0

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by zero