2017 © Pedro Peláez
 

library scheduler

A PHP version of Whenever gem.

image

oudirichi/scheduler

A PHP version of Whenever gem.

  • Sunday, April 30, 2017
  • by oudirichi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Scheduler - whenever gem alternative for PHP

Installation

Install the latest version for global usage with, (*1)

$ composer global require oudirichi/scheduler

or per project, (*2)

$ composer require oudirichi/scheduler

Getting started

$ cd /apps/my-great-project

# for global
$ shedulerize

# for specific project
$ vendor/bin/shedulerize

This will create an initial config/schedule.php file for you., (*3)

The scheduler command

$ cd /apps/my-great-project

$ scheduler

This will simply show you your schedule.rb file converted to cron syntax. It does not read or write your crontab file; you'll need to do this in order for your jobs to execute:, (*4)

$ scheduler --update-crontab

Define your own job types

<?php
Scheduler\job_type("pewpew", "cd :path && :task");

Scheduler\every("* * * * *", function($cron) {
  $cron->pewpew('echo "pewpew" >> log/test.log');
});

Cron format

* * * * * *
| | | | | |
| | | | | +-- Year              (range: 1900-3000)
| | | | +---- Day of the Week   (range: 0-6 OR 1-7, 0 and 7 both stand for Sunday)
| | | +------ Month of the Year (range: 1-12)
| | +-------- Day of the Month  (range: 1-31)
| +---------- Hour              (range: 0-23)
+------------ Minute            (range: 0-59)

The Versions

30/04 2017

dev-master

9999999-dev

A PHP version of Whenever gem.

  Sources   Download

MIT

The Requires

 

30/04 2017

v1.0.0

1.0.0.0

A PHP version of Whenever gem.

  Sources   Download

MIT

The Requires