Cron integration for symfony.
Installing this bundle can be done through these simple steps:
composer require effiana/cron-bundle
// config/bundles.php
Effiana\CronBundle\EffianaCronBundle::class => ['all' => true],
bin/console make:migration
bin/console doctrine:migrations:migrate
OR
bin/console effiana:migration:load --force
bin/console cron:list
bin/console cron:run
* * * * * /path/to/symfony/install/app/console cron:run 1>> /dev/null 2>&1
OR If you don't have a dedicated cron daemon (e.g. in Heroku), you can use:
bin/console cron:start # will run in background mode, use --blocking to run in foreground
bin/console cron:stop # will stop the background cron daemon
bin/console cron:list
Show a list of all jobs. Job names are show with [x] if they are enabled and [ ] otherwise.
bin/console cron:create
Create a new job.
bin/console cron:delete _jobName_
Delete a job. For your own protection, the job must be disabled first.
bin/console cron:enable _jobName_
Enable a job.
bin/console cron:disable _jobName_
Disable a job.
bin/console cron:run [--force] [job]
which we borrowed from Symfony. Make sure to check out php-cs-fixer as this will help you a lot.
bin/console cron:start [--blocking]
Start the cron as a daemon. By default it forks itself to the background and suppresses any output. The --blocking option will keep it in the foreground and will display output. This is useful when you don't have a dedicated cron daemon (e.g. on Heroku).
bin/console cron:stop
Stops the background cron daemon started with cron:start. This is not applicable when the daemon was started with --blocking.
If you would like to help, take a look at the list of issues.
PHP 7.2 or above
Dries De Peuter - dries@nousefreak.be - http://nousefreak.be
See also the list of contributors who participated in this project.
CronBundle is licensed under the MIT license.
How can I help you explore Laravel packages today?