, (*1)
Symfony PHPCron
This package can run scheduled tasks defined in a crontab file., (*2)
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., (*3)
The package can start parallel processes to run the scheduled tasks when time comes., (*4)
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, (*5)
2) Follow in the project folder:, (*6)
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., (*7)
If before your project is not used composer
, connect the startup file vendors. To do this, enter the code in the project:, (*8)
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();
?>