2017 © Pedro Peláez
 

library php-crontab-manager

PHP Crontab Manager

image

kfosoft/php-crontab-manager

PHP Crontab Manager

  • Wednesday, August 12, 2015
  • by KFOSOFT
  • Repository
  • 1 Watchers
  • 1 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

PHP Crontab Manager

Installation

Installation with Composer, (*1)

Add in composer.json, (*2)

    "require": {
        ...
        "kfosoft/php-crontab-manager":"1.0"
    }

Well done!, (*3)

Methods

onMinute($minute) : Set minute or minutes.
onHour($hour) : Set hour or hours.
onDayOfMonth($dayOfMonth) : Set day of month or days of month.
onMonth($month) : Set month or months.
onDayOfWeek($dayOfWeek) : Set day of week or days of week.
on($timeCode) : Set entire time code with one function. This has to be a complete entry. See http://en.wikipedia.org/wiki/Cron#crontab_syntax
doJob($job) : Add job to the jobs array. Each time segment should be set before calling this method. The job should include the absolute path to the commands being used.
setCrontabPath($path) : location of the crontab executable. Default /usr/bin/crontab.
setDestinationPath($path) : location to save the crontab file.
activate($includeOldJobs = true) : Save the jobs to disk, remove existing cron.
clearJobs() : lear array jobs.
clearJobsFile() : Clear jobs file.
listJobs() : List current cron jobs.

Example

$crontab = new /kfosoft/helpers/CronTab();
$crontab->onMinute(10)->onHour(0)->doJob('echo "job is work." >> /home/user/test')->activate();

Enjoy, guys!, (*4)

The Versions

12/08 2015

dev-master

9999999-dev

PHP Crontab Manager

  Sources   Download

The Requires

  • php >=5.4.0

 

by Cyril Turkevich

php php helper php crontab php cron cron helper crontab helper php crontab helper

12/08 2015

v1.0

1.0.0.0

PHP Crontab Manager

  Sources   Download

The Requires

  • php >=5.4.0

 

by Cyril Turkevich

php php helper php crontab php cron cron helper crontab helper php crontab helper