PHP Classes
elePHPant
Icontem

PHP Cron Manager Class for Symfony: Run scheduled tasks in crontab using Symfony

Recommend this page to a friend!
  Info   View files Example   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-05-29 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 162 All time: 8,475 This week: 495Up
Version License PHP version Categories
symfony-php-cron 2.0.0BSD License5.3.3PHP 5, Unix, Console, Parsers
Description Author

This package can run scheduled tasks in crontab using Symfony.

It is a version of a previously published package to parse and process cron files.

This version uses Symfony packages and structure with application command classes to execute several types of operations with cron files.

Currently it provides command classes to execute a task, cancel a task, import a task and get the status of a task.

  Performance   Level  
Name: Dmitry Mamontov <contact>
Classes: 12 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 4x

Details

Latest Stable Version License

Symfony PHPCron

This package can run scheduled tasks defined in a crontab file.

It can parse a file in the crontab format that defines the times and the command lines strings of programs that are scheduled to run regularly.

The package can start parallel processes to run the scheduled tasks when time comes.

Requirements

  • PHP version ~5.3.3.
  • Module installed "pcntl" and "posix".
  • All functions "pcntl" and "posix" removed from the directive "disable_functions".
  • Symfony Console ~2.6
  • Symfony Process ~2.6
  • Symfony FileSystem ~2.6
  • Symfony Finder ~2.6

Installation

1) Install composer

2) Follow in the project folder:

composer require dmamontov/symfony-phpcron ~2.0.0

In config composer.json your project will be added to the library dmamontov/symfony-phpcron, who settled in the folder vendor/. In the absence of a config file or folder with vendors they will be created.

If before your project is not used composer, connect the startup file vendors. To do this, enter the code in the project:

require 'path/to/vendor/autoload.php';

Valid parameters

  • execute [-f] [-d]
  • cancel [-f]
  • import
  • status
  • help

Example of work

<?
require_once 'vendor/autoload.php';
use Slobel\PHPCron\Command\Application;

$cron = new Application();
$cron->run();
?>
  Files folder image Files  
File Role Description
Files folder imagelib (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  lib  
File Role Description
Files folder imageDmitryMamontov (1 directory)

  Files folder image Files  /  lib  /  DmitryMamontov  
File Role Description
Files folder imagePHPCron (2 files, 2 directories)

  Files folder image Files  /  lib  /  DmitryMamontov  /  PHPCron  
File Role Description
Files folder imageCommand (1 file, 1 directory)
Files folder imageTools (2 files)
  Plain text file Entries.php Class Class source
  Plain text file PHPCron.php Class Class source

  Files folder image Files  /  lib  /  DmitryMamontov  /  PHPCron  /  Command  
File Role Description
Files folder imageRoll (4 files)
  Plain text file Application.php Class Class source

  Files folder image Files  /  lib  /  DmitryMamontov  /  PHPCron  /  Command  /  Roll  
File Role Description
  Plain text file CancelCommand.php Class Class source
  Plain text file ExecuteCommand.php Class Class source
  Plain text file ImportCommand.php Class Class source
  Plain text file StatusCommand.php Class Class source

  Files folder image Files  /  lib  /  DmitryMamontov  /  PHPCron  /  Tools  
File Role Description
  Plain text file Config.php Class Class source
  Plain text file Dependences.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:162
This week:0
All time:8,475
This week:495Up