bitweb / zf3-cron-module
BitWeb ZF3 module for cron.
Installs: 17 248
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 5
Forks: 1
Open Issues: 0
Requires
- php: ^5.5|^7.0
- bitweb/stdlib: ~1.1
- cron/cron: ~1.0
- zendframework/zend-mvc: ^3.0
- zendframework/zend-mvc-console: ^1.1
- zendframework/zend-servicemanager: ^2.2 || ^3.0.1
Requires (Dev)
- phpunit/phpunit: 3.7.*
- satooshi/php-coveralls: dev-master
README
ZF3 implementation for Cron/Cron
Working with Zend Framework 2? We've got you covered.
Installation
Installation of CronModule uses composer. For composer documentation, please refer to getcomposer.org.
php composer.phar require bitweb/zf3-cron-module:1.0.*
or add to your composer.json
"require": { "bitweb/zf3-cron-module": "1.0.*" }
Then add BitWeb\CronModule
to your config/application.config.php
Installation without composer is not officially supported, and requires you to install and autoload
the dependencies specified in the composer.json
.
Configuration
Add to your configuration:
'cronModule' => [ 'phpPath' => 'php', 'scriptPath' => '/path/to/application/public/folder/', 'jobs' => [ [ 'command' => 'index.php application cron do-job', 'schedule' => '* * * * *' ], [ 'command' => 'index.php application cron do-another-job', 'schedule' => '0 * * * *' ] ] ]
General options:
Options for cron jobs:
You can also get the configutation file sample from config
folder config/cronModule.config.php.dist
.
Run cron job from command line
php index.php cron module start