Cron Bundle
Cron integration for symfony.
Installation
Installing this bundle can be done through these simple steps:
- Add the bundle to your project as a composer dependency:
// composer.json
{
// ...
require: {
// ...
"cron/cron-bundle": "1.0.*"
}
}
- Update your composer installation:
composer update
- Add the bundle to your application kernel:
// app/AppKernel.php
public function registerBundles()
{
// ...
$bundle = array(
// ...
new Cron\CronBundle\CronCronBundle(),
);
// ...
return $bundles;
}
- Update your DB schema
app/console doctrine:schema:update
- Start using the bundle:
app/console cron:list
app/console cron:run
Available commands
list
app/console cron:list
Show a list of all jobs. Job names are show with [x]
if they are enabled and [ ]
otherwise.
create
app/console cron:create
Create a new job.
delete
app/console cron:delete _jobName_
Delete a job. For your own protection, the job must be disabled first.
enable
app/console cron:enable _jobName_
Enable a job.
disable
app/console cron:disable _jobName_
Disable a job.
run
app/console cron:run [--force] [job]
Run the cron. If a job is given only this will be triggered. You can trigger a specific job that is disabled by using --force.
Contributing
All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.
Fork the project, create a feature branch, and send us a pull request.
To ensure a consistent code base, you should make sure the code follows the Coding Standards which we borrowed from Symfony. Make sure to check out php-cs-fixer as this will help you a lot.
If you would like to help, take a look at the list of issues.
Requirements
PHP 5.3.2 or above
Author and contributors
Dries De Peuter - dries@nousefreak.be - http://nousefreak.be
See also the list of contributors who participated in this project.
License
CronBundle is licensed under the MIT license.